Last active
September 19, 2015 19:28
-
-
Save meeuw/001b7f150efe57708fd7 to your computer and use it in GitHub Desktop.
Testcase for a possible git bug, which wasn't a bug you shouldn't use a "different' push url, instead use a pushdefault to a different remote.
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
rm -rf left/ right/ right.git/ | |
git init left | |
cd left/ | |
echo "hello world" > test.txt | |
git add test.txt | |
git commit -m . | |
cd .. | |
git clone --bare left right.git | |
git clone right.git/ right | |
cd right | |
git remote set-url origin ../left | |
git remote set-url origin --push ../right.git | |
echo "bye world" >> test.txt | |
git commit -a -m . | |
git push | |
git log | |
echo "start: two commits, ok" | |
git fetch | |
git rebase origin/master | |
git log | |
echo "manual fetch/rebase: two commits, still ok" | |
git pull --rebase | |
git log | |
echo "pull: one commits, oops?" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment