From: Eric Wong <normalperson@yhbt.net>
To: Seth Falcon <sethfalcon@gmail.com>
Cc: git@vger.kernel.org
Subject: [PATCH] git-svn: recommend rebase for syncing against an SVN repo
Date: Fri, 25 Aug 2006 12:48:23 -0700 [thread overview]
Message-ID: <20060825194823.GC8957@localdomain> (raw)
In-Reply-To: <20060825191516.GA8957@localdomain>
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>
---
Documentation/git-svn.txt | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt
index 7d86809..9fce4d3 100644
--- a/Documentation/git-svn.txt
+++ b/Documentation/git-svn.txt
@@ -212,12 +212,26 @@ # Commit only the git commits you want t
git-svn commit <tree-ish> [<tree-ish_2> ...]
# Commit all the git commits from my-branch that don't exist in SVN:
git-svn commit remotes/git-svn..my-branch
-# Something is committed to SVN, pull the latest into your branch:
- git-svn fetch && git pull . remotes/git-svn
+# Something is committed to SVN, rebase the latest into your branch:
+ git-svn fetch && git rebase remotes/git-svn
# Append svn:ignore settings to the default git exclude file:
git-svn show-ignore >> .git/info/exclude
------------------------------------------------------------------------
+REBASE VS. PULL
+---------------
+
+Originally, git-svn recommended that the remotes/git-svn branch be
+pulled from. This is because the author favored 'git-svn commit B'
+to commit a single head rather than the 'git-svn commit A..B' notation
+to commit multiple commits.
+
+If you use 'git-svn commit A..B' to commit several diffs and you do not
+have the latest remotes/git-svn merged into my-branch, you should use
+'git rebase' to update your work branch instead of 'git pull'. 'pull'
+can cause non-linear history to be flattened when committing into SVN,
+which can lead to merge commits reversing previous commits in SVN.
+
DESIGN PHILOSOPHY
-----------------
Merge tracking in Subversion is lacking and doing branched development
@@ -310,6 +324,10 @@ the possible corner cases (git doesn't d
copied files are fully supported if they're similar enough for git to
detect them.
+SEE ALSO
+--------
+gitlink:git-rebase[1]
+
Author
------
Written by Eric Wong <normalperson@yhbt.net>.
--
1.4.2.g7c9b
next prev parent reply other threads:[~2006-08-25 19:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-25 16:31 git-svn problem: unexpected files/diffs in commit Seth Falcon
2006-08-25 19:15 ` Eric Wong
2006-08-25 19:28 ` [PATCH] git-svn: establish new connections on commit after fork Eric Wong
2006-08-25 19:48 ` Eric Wong [this message]
2006-08-26 0:46 ` git-svn problem: unexpected files/diffs in commit Seth Falcon
2006-08-26 7:33 ` Eric Wong
2006-08-26 7:01 ` [PATCH] git-svn: add the 'dcommit' command Eric Wong
2006-08-26 16:52 ` [PATCH] git-svn: stop repeatedly reusing the first commit message with dcommit Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060825194823.GC8957@localdomain \
--to=normalperson@yhbt.net \
--cc=git@vger.kernel.org \
--cc=sethfalcon@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.