Difference between revisions of "Git-svn"
From Vague Hope Wiki
(→Checkout of sub-directory) |
(→References) |
||
Line 76: | Line 76: | ||
* http://blog.tsunanet.net/2007/07/learning-git-svn-in-5min.html | * http://blog.tsunanet.net/2007/07/learning-git-svn-in-5min.html | ||
* http://utsl.gen.nz/talks/git-svn/intro.html#using-moving | * http://utsl.gen.nz/talks/git-svn/intro.html#using-moving | ||
+ | |||
+ | * http://techdebug.com/blog/2010/01/06/clone-a-part-of-an-svn-repository-in-git/ | ||
+ | * http://stackoverflow.com/questions/2426654/git-svn-status-showing-changes-that-are-not-committed-to-svn |
Revision as of 04:38, 10 October 2011
Contents
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 status:
git svn stat
Update:
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 and working on SVN sub-directory
Check out
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.
Update and status
git svn fetch git diff --name-status remotes/trunk
Useful git cmds
Show branches:
git branch git branch -a
Check git FS is sane.
git fsck