Created
June 8, 2015 13:19
-
-
Save jenslohmann/fa5ab32874d3e442bb5a to your computer and use it in GitHub Desktop.
Git admin for simple newbies
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
git clone ssh://login@git.server/repo/blah.git | |
cd blah | |
git config user.name "Jens Lohmann" | |
git config user.email "jens.lohmann@mailserver.dk" |
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
svn log http://svn.server/path/to/<project> --xml | grep author | sort -u | perl -pe 's/.*>(.*?)<.*/$1 = /' > authors.txt | |
vi authors.txt | |
scp authors.txt login@your.server: | |
ssh login@git.server | |
cd /repo | |
# Only clones trunk and its histrory. Seach the internet for branches and tags | |
git svn clone --no-metadata --authors-file=~/authors.txt http://svn.server/path/to/<project>/trunk blah.git | |
# Make it "bare" | |
cd blah.git | |
mv .git .. | |
rm -fr * | |
mv ../.git . | |
mv .git/* . | |
rmdir .git | |
git config --bool core.bare true | |
# And make it "shared" | |
git config core.sharedRepository group | |
chgrp -R proj . | |
chmod -R g+w . | |
find . -type d -exec chmod g+s {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment