Created
August 22, 2012 08:49
-
-
Save tiejunhu/3423848 to your computer and use it in GitHub Desktop.
git mirror test
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
# init a repo | |
mkdir repo | |
cd repo | |
git init --bare . | |
# make init commit | |
cd .. | |
git clone repo work | |
cd work | |
echo "test" > readme.txt | |
git commit -a -m "init" | |
git push origin master | |
cd .. | |
rm -rf work | |
# mirror | |
git clone --mirror repo repo2 | |
# clone repo2 and test | |
git clone repo2 work | |
cd work | |
echo "test2" >> readme.txt | |
git commit -a -m "commit 2" | |
git push # succeed here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment