Difference between revisions of "Git-svn"

From Vague Hope Wiki
Jump to: navigation, search
(Basic usage of git-svn)
Line 52: Line 52:
 
</pre>
 
</pre>
 
Then branch, etc. as usual.
 
Then branch, etc. as usual.
 
== Useful git cmds ==
 
Show branches:
 
<pre>
 
git branch
 
git branch -a
 
</pre>
 
 
Check git FS is sane.
 
<pre>
 
git fsck
 
</pre>
 
  
 
== References ==
 
== References ==

Revision as of 04:40, 10 October 2011

Basic usage of git-svn

Checkout:

mkdir prjname
cd prjname
git svn init https://example.com/svn/prjname/trunk
git svn fetch -r HEAD
git checkout -b nameoflocalbranch
git svn show-ignore > .gitignore

Show (SVN) status:

git svn fetch
git diff --name-status remotes/trunk

Update with incoming changes:

git svn fetch
git svn rebase

Commit changes:

git status
git add path/to/file
git commit
git svn rebase
git svn dcommit

Checkout with branches

mkdir prjname
cd prjname
git svn init https://example.com/svn/prjname
git svn fetch -r HEAD
git checkout -b nameoflocalbranch
git svn show-ignore > .gitignore

Checkout of SVN sub-directory

mkdir prjname
cd prjname
git svn init --stdlayout --no-minimize-url https://example.com/svn/teamname/prjname
git svn fetch

Then branch, etc. as usual.

References