Created
June 7, 2018 15:06
-
-
Save chris-kobrzak/1a9f0e3bc87a25fc26c2e807a86b76ba to your computer and use it in GitHub Desktop.
Git cheat sheet
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
# Get the most recent commit ID | |
git rev-parse HEAD | |
# Detect if feature branch has been rebased on master | |
git checkout <your-feauture-branch> | |
git checkout master | |
masterHeadId=`git rev-parse HEAD` | |
git checkout - | |
git log --pretty=oneline --no-abbrev-commit | grep $masterHeadId | wc -l | |
# the above prints 1 or 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment