Skip to content

Instantly share code, notes, and snippets.

@Krizzzn
Last active December 14, 2015 22:39
Show Gist options
  • Save Krizzzn/5160456 to your computer and use it in GitHub Desktop.
Save Krizzzn/5160456 to your computer and use it in GitHub Desktop.
Git Cheatsheet

checkout single file from any commit

>git show HEAD~4:index.html > oldIndex.html
-or-
>git show a7063efcd:index.html > oldIndex.html
-or-
>git checkout <branch_name> index.html

rebasing

>git checkout feature/awesome&new
>git rebase development
putting changes in development underneath the current feature branch

>git rebase ad7d7a35290b^ --interactive
rewrite history. move commits up and down.

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