Skip to content

Instantly share code, notes, and snippets.

@tiejunhu
Created August 22, 2012 08:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tiejunhu/3423848 to your computer and use it in GitHub Desktop.
Save tiejunhu/3423848 to your computer and use it in GitHub Desktop.
git mirror test
# 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