Skip to content

Instantly share code, notes, and snippets.

@annacruz
Last active April 10, 2018 00:34
Show Gist options
  • Save annacruz/9c981fc3e94a47397c7b77c2bf330bc5 to your computer and use it in GitHub Desktop.
Save annacruz/9c981fc3e94a47397c7b77c2bf330bc5 to your computer and use it in GitHub Desktop.
Some cool git commands to keep in mind
git stash -u

Stash files included the untracked ones

git log --full-history --all -- <path-to-file>

git log -u <path-to-file>

Search in all commits that touch the file (the second command shows up all the differences)

git fixup <hash_of_commit>

Create a fixup commit

git rebase -i --autosquash <hash_of_commit>

Squash all fixup commits and rebase in the hash one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment