Skip to content

Instantly share code, notes, and snippets.

@Skycocoo
Last active June 7, 2018 04:13
Show Gist options
  • Save Skycocoo/0e4ee76f6a1eea034d24629472633718 to your computer and use it in GitHub Desktop.
Save Skycocoo/0e4ee76f6a1eea034d24629472633718 to your computer and use it in GitHub Desktop.
Git squash commits

merge commits:

git rebase -i HEAD~(# the number of merging commits - 1)

revert changes:

git reflog # or git log -g

remove staged folder in cache:

git rm --cached -r [folder name]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment