Created
September 21, 2015 04:18
-
-
Save yihyang/c439a9415d7f01b13922 to your computer and use it in GitHub Desktop.
Cheat Sheets for git (Advanced)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Checkout previous commit and saves it into a branch | |
git checkout -b <new_branch_name> <commit code> | |
## Comparing modified file in single line between branches | |
# This one shows in "M abc.html" format | |
git diff --name-status master..branchName | |
# This one shows in "Gemfile.lock | 39 +----" format | |
git diff --stat --color master..branchName |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment