Retrieving new commits from the Subversion server

We can even use Git to fetch changes with the git svn fetch command, or directly update the local working copy using git svn rebase as a Git counterpart for the svn update command:

$ git svn rebase 

Git will fetch new commits from the remote Subversion server, as per a git pull command; then, it will rebase them on the top of the branch you are in at the moment. Maybe you are wondering why we are using rebasing instead of merging, like the git pull command does by default while dealing with a Subversion remote. Using the merge command instead of rebase while applying remote commits can be harmful; in the past, Git had some troubles dealing with Subversion svn:mergeinfo properties (http://svnbook.red-bean.com/en/1.6/svn.ref.svn.c.mergeinfo.html), and even if it supports them (https://www.git-scm.com/docs/git-svn/2.11.1#git-svn---mergeinfoltmergeinfogt) rebasing is considered a safer option.

Git and Subversion integration is a wide topic; for other commands and options, I recommend to read the main page git svn --help.

Using Git as a Subversion client is not the best we can obtain, but at least it is a way to start using Git even if you cannot abandon Subversion instantly.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.23.30