Hi,
I ran the following command "git svn clone --stdlayout https://denpwsvn1/svn/magnetar magnetar" to convert one of my Subversion repositories to GIT. Now I want to add that to a new bare repository I added in Stash called magnetar that is located at "http://amorin@dentwgit1:7990/scm/MAG/magnetar.git". I am having trouble here and not sure how to do this. I tried cd'ing into the converted repo and running...
git remote add magnetar http://amorin@dentwgit1:7990/scm/MAG/magnetar.git
then
git push --all magnetar
I get propmted for my password and the recieve the following message.
Password for 'http://amorin@dentwgit1:7990':
No refs in common and none specified; doing nothing.
Perhaps you should specify a branch such as 'master'.
Everything up-to-date
Any idea on what I am missing. Sorry very new to GIT.
Thanks
Andrew
Hello Andrew,
Have a look at SVN Importer Plugin for Stash, https://marketplace.atlassian.com/plugins/org.tmatesoft.subgit.stash-svn-importer
With this plugin, you can import any SVN repository into Git right from the Stash UI:
The plugin imports revisions from SVN to Git in the background. You can pause and resume the importing process at any time.
The plugin is Free; it's based on SubGit tool. For more details please refer to http://subgit.com/stash/ or contact us at support@subgit.com
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andrew,
error: src refspec master does not match any.
means you don't have a local branch called master.
Just to double check, does the initial Subversion repository you cloned follow the standard Subversion layout and includes trunk, tags and branches subdirectories under https://denpwsvn1/svn/magnetar?
I'm assuiming it does as you've cloned the repository with the --stdlayout flag.
git push --all tries to push all the locla branches in the git repository but
after running the `git svn clone` command, you need to convert all the
Subversion branches to local branches first before you can push them.
The process briefly works like this:
* You do an initial clone (using `git svn clone`)
* You turn the Subversion branches into _local_ git branches
* You turn the Subversion tags (that are just tracked as git branches initially) into git tags
* Now you can push.
If you follow the steps on http://go-dvcs.atlassian.com/display/aod/Clean+Up,
you should be able to push your repository to Stash.
We have a more detailed description about the migration process here (this is talking about moving to Bitbucket but the initial steps apply to Stash as well):
http://go-dvcs.atlassian.com/display/aod/Migrating+from+Subversion+to+Git+on+Bitbucket
and I've written a post about moving the Confluence team on our blog, explaining the process:
http://blogs.atlassian.com/2012/01/moving-confluence-from-subversion-to-git/
Hope this helps.
Cheers,
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes I use the stdlayout for that repository. Thanks..I was just reading about that. Thanks for pointing me in the right direction!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I also followed the "My code is already tracked by GIT" instructions in Stash using...
C:\Subversion\magnetar\magnetar>git remote set-url origin http://amorin@dentwgit1:7990/scm/MAG/magnetar.git
C:\Subversion\magnetar\magnetar>git push origin master
Password for 'http://amorin@dentwgit1:7990':
error: src refspec master does not match any.
error: failed to push some refs to 'http://amorin@dentwgit1:7990/scm/MAG/magnetar.git'
and got the message above...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.