I try to migrate out svn repo to the bitbucket. My command history:
# git svn clone --authors-file=./authors.txt --trunk DBApp2/trunk --tags DBApp2/tags https://svn.server/reponame/ ad
# java -Dfile.encoding=utf-8 -jar ~/svn-migration-scripts.jar clean-git
# git branch -a
master
remotes/origin/BIN
remotes/origin/BIN@400
remotes/origin/ExListCtrl
remotes/origin/ExListCtrl@400
[....]
# git remote add origin http://mhobler@bitbucket.server:7990/scm/dat/ad.git
# git push -u origin --all
Password for 'http://mhobler@bitbucket.server:7990':
Counting objects: 91286, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (17631/17631), done.
Writing objects: 100% (91286/91286), 484.04 MiB | 34.09 MiB/s, done.
Total 91286 (delta 74607), reused 89339 (delta 72953)
remote: Resolving deltas: 100% (74607/74607), done.
To http://bitbucket.serverl:7990/scm/dat/ad.git
* [new branch] master -> master
Branch master set up to track remote branch master from origin.
#
As you can see, there is only one branch pushed to server. The bitbucket web interface also shows only one branch (master).
How can I push other branches to server?
Check the .git/config file and see what has been added in there.
If you find the branches are still listed and svn remotes you will need to rename them to 'branches' to get the push to work correctly.
Thank you. Can you please be more specific? What should I rename? How?
my .git/config looks like this:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[svn-remote "svn"]
url = https://svn.server/reponame
fetch = ad/trunk:refs/remotes/origin/trunk
branches = ad/qb*:refs/remotes/origin/*
branches = ad/QB*:refs/remotes/origin/*
branches = ad/devel*:refs/remotes/origin/*
branches = ad/Polaris/*:refs/remotes/origin/*
tags = ad/tags/*:refs/remotes/origin/tags/*
branches = ad/qb*:refs/remotes/origin/*
branches = ad/QB*:refs/remotes/origin/*
branches = ad/devel*:refs/remotes/origin/*
branches = ad/Polaris/*:refs/remotes/origin/*
tags = ad/tags/*:refs/remotes/origin/tags/*
[svn]
authorsfile = /home/marek/gitmigration/authors.txt
[remote "origin"]
url = http://mhobler@bitbucket.server:7990/scm/reponame/ad.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[gitg]
mainline = refs/heads/master
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I run the following sets of commands on a new copy to ensure they match up to git expectations.
cd ${repo_name} sed '/svn-remote/a branches = ' .git/config > .git/newconfig sed '/svn-remote/a tags = ' .git/newconfig > .git/config #java -Dfile.encoding=utf-8 -jar /usr/local/cpa_bb/repos/svn-migration-scripts.jar clean-git --force for branch in `git branch -r | sed 's/ origin\///'`; do echo $branch; git branch $branch remotes/origin/$branch; done cd ..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.