Wednesday, September 20, 2017

fatal: Not a gitflow-enabled repo yet. Please run "git flow init" first.


fatal: Not a gitflow-enabled repo yet. Please run "git flow init" first.

Please follow below steps to remove this issue:


  1. Open the .git\config file
  2. Remove all the [gitflow * entries and save the file
  3. Close and re-open SourceTree
  4. Go in the main menu, go to Repository > Git Flow > Initialise Repository (should be enabled now)

Using Sed command to search and replace text in XML file or any other file .




Using Sed command to search and replace text in XML file or any other file .


To replace entire line with a specific text/string in linux by using sed command

Syntax:

sed -i 's/.*<TEXT>.*/<TEXT TO BE ON REPLACED LINE>/' *.xml

Replace below placeholders completely to put your required string/text in above syntax.

<TEXT>
<TEXT TO BE ON REPLACED LINE>

Please be aware of the escape sequence while executing the command. 


eg. Here I am replacing entire line which contains <lastmod> tag with <lastmod>2017-07-19T15:09:05+08:00</lastmod>

So please see that closing </lastmod> tag is having `\` (escape sequence). In you case it may vary depending upon your requirement.

sed -i 's/.*<lastmod>.*/<lastmod>2017-07-19T15:09:05+08:00<\/lastmod>/' *.xml

Be specific to the syntax and consider each and every comma and other preposition.









Fixing yum command on linux

You may find yourself having to fix more packages. So you can just remove everything you had installed via  pip and reinstall everythin...