This guide is just for the people who can't abandon subversion
but still want to benifit from git.
If you have no idea about git, this git guide can help.
Checkout a svn repository by running the command
git svn clone <svn_repo_url>
For the repo in standard layout, which has trunk, branches and tags sub-dirs, use
git svn clone -s <svn_repo_url>
Here we can work on local git repository and add changes to Staging Area by
git add <filename>
And then commit changes by
git commit -m "Commit message"
Now all changes are commited to local git repo, but not in remote svn repo yet.
Remember that, we used to run svn up before svn ci, in case of confilt.
Similarly before commiting to svn, launch
git svn rebase
This will pull down all changes in svn server, and patch your local changes to it
Now we can push changes to remote svn repo. Launch the commit
git svn dcommit
To create a svn branch, we can use
git svn branch <branch_name>
New branches will be created under branches directory, if specified -s in git svn clone
Then create a local working branch by running
git branch branch_name remotes/branch_name
Now we can work in this branch and svn dcommit/svn rebase will effect the remote svn branch
To create a svn tag, we can use
git svn tag <tag_name>
The same as branching, new tags will be created under tags directory.
comments
comments powered by Disqus