Last active
August 8, 2016 09:58
-
-
Save vaibhav276/8e393ee362b9194f89e8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Show commits diffrence between two branches | |
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative branch-A..branch-B | |
# Create patch | |
git format-patch <branch-to-compare-with> --stdout > <filename> | |
git format-patch commitStart^..commitLatest --stdout > <filename> | |
# Apply patch | |
git apply --check <filename> | |
git am --signoff < <filename> | |
# List conflicted files after merge | |
git diff --name-only --diff-filter=U | |
# Undo merge | |
git reset --merge ORIG_HEAD | |
# View file history | |
git log -p <file> | |
# Add files to last commit | |
git commit --amend –C HEAD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment