Skip to content

Instantly share code, notes, and snippets.

@actaneon
Created March 24, 2010 05:42
Show Gist options
  • Save actaneon/342017 to your computer and use it in GitHub Desktop.
Save actaneon/342017 to your computer and use it in GitHub Desktop.
Git Commands
list untracked, unignored files: git ls-files -o --exclude-standard
unstage: git reset HEAD FILE
unstage and undo local: git reset --hard HEAD FILE
undo unstaged file: git checkout -- FILE
undo commit with using new commit: git revert [HEAD|$id]
update last commit to include missed adds: git commit --amend (after git add FILE)
git push origin :branch #remove remote
git remote prune origin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment