Skip to content

Instantly share code, notes, and snippets.

@ijmorgado
Last active December 15, 2015 09:49
Show Gist options
  • Save ijmorgado/5241743 to your computer and use it in GitHub Desktop.
Save ijmorgado/5241743 to your computer and use it in GitHub Desktop.
A small list of most common git commands I use (Is really important keep it saved, because sometimes it save us time of search on official documentations and forums.... :))
----- git rm -r --cached <folder_name>
It discard of git index but not from local working copy...useful when by accident we pushed something to remote repository and then we have to remove it from that repo.
----- git remote set-url <remote_name> <new_url_here>
It can set a new url for the current repository, useful when we change the name of the repository on Github for example, as Github also change the url for this.
----- git update-index --assume-unchanged <file>
To temporarily ignore changes in a certain file.
----- git update-index --no-assume-unchanged <file>
when you want to track changes again, after they were ignored by assume-unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment