Difference between revisions of "Git svn"
Line 1: | Line 1: | ||
− | = | + | = relax branches at github = |
− | = How import | + | Now add this as a private remote, by setting the remote name '''hub'''. |
+ | git remote add hub https://GIT_USER_NAME@github.com/GIT_USER_NAME/relax_trunk.git | ||
+ | |||
+ | Now add this as a private remote, by setting the remote name '''hub'''. | ||
+ | git remote add hub https://GIT_USER_NAME@github.com/GIT_USER_NAME/relax_disp.git | ||
+ | |||
+ | |||
+ | == Get future updates == | ||
+ | For future updates to the SVN revision HEAD, you now need to do a git svn rebase, which is very similar to: svn up | ||
+ | git svn rebase | ||
+ | Check branch information | ||
+ | git branch -a | ||
+ | |||
+ | = How the import to github was done = | ||
[http://www.tfnico.com/presentations/git-and-subversion Based on these posts] and on [http://trac.parrot.org/parrot/wiki/git-svn-tutorial this recommended post], and [http://john.albin.net/git/convert-subversion-to-git also this post.] | [http://www.tfnico.com/presentations/git-and-subversion Based on these posts] and on [http://trac.parrot.org/parrot/wiki/git-svn-tutorial this recommended post], and [http://john.albin.net/git/convert-subversion-to-git also this post.] | ||
Line 8: | Line 21: | ||
cd C:\WinPython27\relax | cd C:\WinPython27\relax | ||
− | + | You need an [[Authors#authors.txt | authors.txt]] file, to correctly convert the metadata. | |
− | |||
− | |||
− | You | ||
git svn clone http://svn.gna.org/svn/relax/trunk --no-metadata -A authors.txt | git svn clone http://svn.gna.org/svn/relax/trunk --no-metadata -A authors.txt | ||
− | + | copy authors.txt trunk | |
git svn clone http://svn.gna.org/svn/relax/branches/relax_disp --no-metadata -A authors.txt | git svn clone http://svn.gna.org/svn/relax/branches/relax_disp --no-metadata -A authors.txt | ||
− | + | copy authors.txt relax_disp | |
#Build | #Build | ||
Line 24: | Line 34: | ||
cd relax_disp | cd relax_disp | ||
scons | scons | ||
− | |||
− | |||
− | |||
− | |||
== Setup remotes to github == | == Setup remotes to github == | ||
=== For branch trunk === | === For branch trunk === | ||
cd C:\WinPython27\relax\trunk | cd C:\WinPython27\relax\trunk | ||
− | |||
# If you are a member of the organization, with writing permissions, then do: | # If you are a member of the organization, with writing permissions, then do: | ||
git remote add origin https://GIT_USER_NAME@github.com/nmr-relax/relax_trunk.git | git remote add origin https://GIT_USER_NAME@github.com/nmr-relax/relax_trunk.git | ||
Line 39: | Line 44: | ||
git remote show origin | git remote show origin | ||
− | Now go to github.com at https://github.com/ | + | Now go to github.com at https://github.com/organizations/nmr-relax click '''Repositories -> New'''.<br> |
Call it '''relax_trunk'''. We want to preserve history , so do not '''Initialize this repository with a README''' or anything like, README or .gitignore. <br> | Call it '''relax_trunk'''. We want to preserve history , so do not '''Initialize this repository with a README''' or anything like, README or .gitignore. <br> | ||
− | |||
− | |||
− | |||
Then send svn branch master of to github | Then send svn branch master of to github | ||
− | git push -u | + | git push -u origin master |
− | |||
− | |||
− | |||
=== For branch relax_disp === | === For branch relax_disp === | ||
cd C:\WinPython27\relax\relax_disp | cd C:\WinPython27\relax\relax_disp | ||
− | |||
# If you are a member of the organization, with writing permissions, then do: | # If you are a member of the organization, with writing permissions, then do: | ||
git remote add origin https://GIT_USER_NAME@github.com/nmr-relax/relax_disp.git | git remote add origin https://GIT_USER_NAME@github.com/nmr-relax/relax_disp.git | ||
Line 60: | Line 58: | ||
git remote show origin | git remote show origin | ||
− | Now go to github.com at https://github.com/ | + | Now go to github.com at https://github.com/organizations/nmr-relax click '''Repositories -> New'''.<br> |
Call it '''relax_disp'''. We want to preserve history , so do not '''Initialize this repository with a README''' or anything like, README or .gitignore. <br> | Call it '''relax_disp'''. We want to preserve history , so do not '''Initialize this repository with a README''' or anything like, README or .gitignore. <br> | ||
− | |||
− | |||
− | |||
Then send svn branch master of to github | Then send svn branch master of to github | ||
− | git push -u | + | git push -u origin master |
== git operations == | == git operations == |
Revision as of 14:24, 22 July 2013
Contents
relax branches at github
Now add this as a private remote, by setting the remote name hub.
git remote add hub https://GIT_USER_NAME@github.com/GIT_USER_NAME/relax_trunk.git
Now add this as a private remote, by setting the remote name hub.
git remote add hub https://GIT_USER_NAME@github.com/GIT_USER_NAME/relax_disp.git
Get future updates
For future updates to the SVN revision HEAD, you now need to do a git svn rebase, which is very similar to: svn up
git svn rebase
Check branch information
git branch -a
How the import to github was done
Based on these posts and on this recommended post, and also this post.
You should install msysgit on windows, to do the checkout.
md C:\WinPython27\relax cd C:\WinPython27\relax
You need an authors.txt file, to correctly convert the metadata.
git svn clone http://svn.gna.org/svn/relax/trunk --no-metadata -A authors.txt copy authors.txt trunk
git svn clone http://svn.gna.org/svn/relax/branches/relax_disp --no-metadata -A authors.txt copy authors.txt relax_disp
#Build cd trunk scons cd .. cd relax_disp scons
Setup remotes to github
For branch trunk
cd C:\WinPython27\relax\trunk # If you are a member of the organization, with writing permissions, then do: git remote add origin https://GIT_USER_NAME@github.com/nmr-relax/relax_trunk.git # See the info git remote -v git remote show origin
Now go to github.com at https://github.com/organizations/nmr-relax click Repositories -> New.
Call it relax_trunk. We want to preserve history , so do not Initialize this repository with a README or anything like, README or .gitignore.
Then send svn branch master of to github
git push -u origin master
For branch relax_disp
cd C:\WinPython27\relax\relax_disp # If you are a member of the organization, with writing permissions, then do: git remote add origin https://GIT_USER_NAME@github.com/nmr-relax/relax_disp.git # See the info git remote -v git remote show origin
Now go to github.com at https://github.com/organizations/nmr-relax click Repositories -> New.
Call it relax_disp. We want to preserve history , so do not Initialize this repository with a README or anything like, README or .gitignore.
Then send svn branch master of to github
git push -u origin master
git operations
You may need to make a setting how we push branches.
git config push.default simple