Skip to content

Handy git commands

  • Show adapted files
git diff --cached --name-only
  • Show adapted file
git diff master package.json
  • Revert a commit
git show HEAD > patch git revert HEAD git apply patch
  • Undo commit to unstaged changes
git reset HEAD~
  • rebase
Git rebase -I HEAD~4 > 4 commits rebasen Git rebase - I commitnr Vim > I > change pick by s > esc >wq
  • check casesensitive files in
git config core.ignorecase false
  • show what has been committed on remote
git log development..origin/development --oneline
  • Show file difference between 2 branches (the commits that are ahead are compared to the ones behind) 
git diff development..origin/development .babelrc
Published inToolsUncategorized

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *