Sunday, March 4

SVN and GIT cheat sheet

If you're reading this, you don't need to be convinced of how awesome GIT is. This is actually the cheat sheet I use when I need a GIT command. Hope it helps you as much as it helps me when my memory fails.

Cloning

... more to come here

git-svn and clone

Cloning an svn repository where there is only one project with the standard layout(repo_url/[tags trunk branches]):

git svn clone --stdlayout [http(s)|svn]://repo_url local_name

Cloning an svn repo that is deeper in the svn tree

git svn clone --stdlayout --no-minimize-url --stdlayout [http(s)|svn]://repo_url local_name


Branch and merge

Working with branches

Push local branch to new remote branch

git push origin newbranch

Track a remote branch with a new local branch

git branch --track localbranch_name origin/remotebranch_name

Associate your local master branch to a remote master

git remote add origin repourl

References:

No comments: