google code with gitPosted: September 16, 2010
google code allows to use SVN to access the code and I was wondering whether there is way to access code with git.
$ git svn clone --username your-name -s https://your-project.googlecode.com/svn few other commands git log gitk git diff HEAD^^
git add filename git rm filename git commit -a => commits to local repository git push => sends to server repository
- Update – get online and check latest changes from google code
git svn rebase
- Export – sends commits to google code
git svn dcommit => sends commit
- Other useful commads:
git branch -a => shows all branches
You have noticed that svn command connected with git “git svn”. This is as already written google supports SVN, but git can comunicate “SVN” way 🙂
You can use “egit” plugin to connect your eclipse to git repository.
So summary time - equivalent svn/git commands - Git for SVN Usersvn checkout $SVNREP/trunk -> git svn clone $SVNREP -T trunk -b branches -t tags svn checkout $SVNREP/branches/release-0.3 -> git checkout -b local/release-0.3 release-0.3 svn commit -> git commit -a, or git add then git commit followed by git-svn dcommit svn diff|less, svn commit -> git commit -v svn merge -> git cherry-pick or use "gitk --all" svn status -> git status svn revert, --recursive -> git checkout , git checkout -f or git reset --hard svn diff -> git diff svn update -> git svn rebase --all (see also git stash)