Created
June 25, 2014 09:22
-
-
Save joxxoxo/3f4d4f5aeab1ca4920ff to your computer and use it in GitHub Desktop.
execute command for each revision in branch (do not count separate commits that were merged)
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
#!/bin/bash | |
( | |
base_dir=~/repo | |
cd $base_dir | |
# To test | |
# git reset master~10 --hard | |
git reset --hard | |
git clean -xdf | |
git fetch | |
revs=`git rev-list --first-parent --reverse master..origin/master` | |
for rev in $revs; do | |
echo $rev | |
done | |
git reset --hard | |
git clean -xdf | |
git rebase origin/master | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment