Useful terminal commands

  • Posted on: 26 November 2018
  • By: stillfinder

Find all files that contain a certain string of text

grep -r 'navbar_search' .

Git

Determines the URL that a local Git repository was originally cloned from

git config --get remote.origin.url

Git. Rename Branches

Rename the current branch

git branch -m new-name

Rename the different branch (not current)

git branch -m old-name new-name

Delete the old-name remote branch and push the new-name local branch

git push origin :old-name new-name

Reset the upstream branch for the new-name local branch

git push origin -u new-name

The article will be updated...