@matheusbsbs / matheus-bagliano / commits / 2e93115ed8
Fork 0

git-svn: recommend rebase for syncing against an SVN repo

Does this make sense to other git-svn users out there? pull can give funky history unless you understand how git-svn works internally, which users should not be expected to do. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>

Eric Wong committed Aug 25, 2006 at 12:48 UTC 2e93115ed84901fb8ee8447a1baf37cd8c343d8e
1 file changed +20 -2
Documentation/git-svn.txt
+20 -2
@@ -235,12 +235,26 @@ Tracking and contributing to an Subversion managed-project:
235 git-svn commit <tree-ish> [<tree-ish_2> ...]
236 # Commit all the git commits from my-branch that don't exist in SVN:
237 git-svn commit remotes/git-svn..my-branch
238 -# Something is committed to SVN, pull the latest into your branch:
239 - git-svn fetch && git pull . remotes/git-svn
238 +# Something is committed to SVN, rebase the latest into your branch:
239 + git-svn fetch && git rebase remotes/git-svn
240 # Append svn:ignore settings to the default git exclude file:
241 git-svn show-ignore >> .git/info/exclude
242 ------------------------------------------------------------------------
243
244 +REBASE VS. PULL
245 +---------------
246 +
247 +Originally, git-svn recommended that the remotes/git-svn branch be
248 +pulled from. This is because the author favored 'git-svn commit B'
249 +to commit a single head rather than the 'git-svn commit A..B' notation
250 +to commit multiple commits.
251 +
252 +If you use 'git-svn commit A..B' to commit several diffs and you do not
253 +have the latest remotes/git-svn merged into my-branch, you should use
254 +'git rebase' to update your work branch instead of 'git pull'. 'pull'
255 +can cause non-linear history to be flattened when committing into SVN,
256 +which can lead to merge commits reversing previous commits in SVN.
257 +
258 DESIGN PHILOSOPHY
259 -----------------
260 Merge tracking in Subversion is lacking and doing branched development
@@ -339,6 +353,10 @@ the possible corner cases (git doesn't do it, either). Renamed and
353 copied files are fully supported if they're similar enough for git to
354 detect them.
355
356 +SEE ALSO
357 +--------
358 +gitlink:git-rebase[1]
359 +
360 Author
361 ------
362 Written by Eric Wong <normalperson@yhbt.net>.