Skip to content

Commit 4511c89

Browse files
Eric WongJunio C Hamano
authored andcommitted
git-svn: documentation updates
Eliminate 'commit' from some places and plug 'dcommit' more. Also update the section --id (GIT_SVN_ID) usage since we have multi-init/multi-fetch now. Signed-off-by: Eric Wong <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9aca025 commit 4511c89

File tree

1 file changed

+19
-21
lines changed

1 file changed

+19
-21
lines changed

Documentation/git-svn.txt

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ latest revision.
4949

5050
Note: You should never attempt to modify the remotes/git-svn
5151
branch outside of git-svn. Instead, create a branch from
52-
remotes/git-svn and work on that branch. Use the 'commit'
52+
remotes/git-svn and work on that branch. Use the 'dcommit'
5353
command (see below) to write git commits back to
5454
remotes/git-svn.
5555

@@ -274,7 +274,7 @@ ADVANCED OPTIONS
274274

275275
-b<refname>::
276276
--branch <refname>::
277-
Used with 'fetch' or 'commit'.
277+
Used with 'fetch', 'dcommit' or 'commit'.
278278

279279
This can be used to join arbitrary git branches to remotes/git-svn
280280
on new commits where the tree object is equivalent.
@@ -368,7 +368,7 @@ SVN was very wrong.
368368
Basic Examples
369369
~~~~~~~~~~~~~~
370370

371-
Tracking and contributing to an Subversion managed-project:
371+
Tracking and contributing to a Subversion-managed project:
372372

373373
------------------------------------------------------------------------
374374
# Initialize a repo (like git init-db):
@@ -377,10 +377,9 @@ Tracking and contributing to an Subversion managed-project:
377377
git-svn fetch
378378
# Create your own branch to hack on:
379379
git checkout -b my-branch remotes/git-svn
380-
# Commit only the git commits you want to SVN:
381-
git-svn commit <tree-ish> [<tree-ish_2> ...]
382-
# Commit all the git commits from my-branch that don't exist in SVN:
383-
git-svn commit remotes/git-svn..my-branch
380+
# Do some work, and then commit your new changes to SVN, as well as
381+
# automatically updating your working HEAD:
382+
git-svn dcommit
384383
# Something is committed to SVN, rebase the latest into your branch:
385384
git-svn fetch && git rebase remotes/git-svn
386385
# Append svn:ignore settings to the default git exclude file:
@@ -404,26 +403,24 @@ which can lead to merge commits reversing previous commits in SVN.
404403
DESIGN PHILOSOPHY
405404
-----------------
406405
Merge tracking in Subversion is lacking and doing branched development
407-
with Subversion is cumbersome as a result. git-svn completely forgoes
408-
any automated merge/branch tracking on the Subversion side and leaves it
409-
entirely up to the user on the git side. It's simply not worth it to do
410-
a useful translation when the original signal is weak.
406+
with Subversion is cumbersome as a result. git-svn does not do
407+
automated merge/branch tracking by default and leaves it entirely up to
408+
the user on the git side.
411409

412410
[[tracking-multiple-repos]]
413411
TRACKING MULTIPLE REPOSITORIES OR BRANCHES
414412
------------------------------------------
415-
This is for advanced users, most users should ignore this section.
416-
417413
Because git-svn does not care about relationships between different
418414
branches or directories in a Subversion repository, git-svn has a simple
419415
hack to allow it to track an arbitrary number of related _or_ unrelated
420-
SVN repositories via one git repository. Simply set the GIT_SVN_ID
421-
environment variable to a name other other than "git-svn" (the default)
422-
and git-svn will ignore the contents of the $GIT_DIR/svn/git-svn directory
423-
and instead do all of its work in $GIT_DIR/svn/$GIT_SVN_ID for that
424-
invocation. The interface branch will be remotes/$GIT_SVN_ID, instead of
425-
remotes/git-svn. Any remotes/$GIT_SVN_ID branch should never be modified
426-
by the user outside of git-svn commands.
416+
SVN repositories via one git repository. Simply use the --id/-i flag or
417+
set the GIT_SVN_ID environment variable to a name other other than
418+
"git-svn" (the default) and git-svn will ignore the contents of the
419+
$GIT_DIR/svn/git-svn directory and instead do all of its work in
420+
$GIT_DIR/svn/$GIT_SVN_ID for that invocation. The interface branch will
421+
be remotes/$GIT_SVN_ID, instead of remotes/git-svn. Any
422+
remotes/$GIT_SVN_ID branch should never be modified by the user outside
423+
of git-svn commands.
427424

428425
[[fetch-args]]
429426
ADDITIONAL FETCH ARGUMENTS
@@ -486,7 +483,8 @@ If you are not using the SVN::* Perl libraries and somebody commits a
486483
conflicting changeset to SVN at a bad moment (right before you commit)
487484
causing a conflict and your commit to fail, your svn working tree
488485
($GIT_DIR/git-svn/tree) may be dirtied. The easiest thing to do is
489-
probably just to rm -rf $GIT_DIR/git-svn/tree and run 'rebuild'.
486+
probably just to rm -rf $GIT_DIR/git-svn/tree and run 'rebuild'. You
487+
can avoid this problem entirely by using 'dcommit'.
490488

491489
We ignore all SVN properties except svn:executable. Too difficult to
492490
map them since we rely heavily on git write-tree being _exactly_ the

0 commit comments

Comments
 (0)