Skip to content

Instantly share code, notes, and snippets.

@droganaida
Created April 5, 2018 06:37
Show Gist options
  • Select an option

  • Save droganaida/0412cf23925be18afafefc4ad27924ea to your computer and use it in GitHub Desktop.

Select an option

Save droganaida/0412cf23925be18afafefc4ad27924ea to your computer and use it in GitHub Desktop.
Most useful git commands
# undo git pull
git reset --hard ORIG_HEAD
# remove specific file from git cache
git rm --cached filename
# remove all files from git cache
git rm -r --cached .
git add .
git commit -m ".gitignore is now working"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment