Created
November 26, 2018 17:36
-
-
Save kawakami-o3/b7098989a8afa8b06ae27a5c44eac642 to your computer and use it in GitHub Desktop.
checkout next commit
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
#!/bin/sh | |
current=`git log --oneline | wc | awk '{print $1}'` | |
sha1=`git log master --oneline | tail -$((current+1)) | head -1 | awk '{print $1}'` | |
git checkout $sha1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment