We have multiple branches under SVN repo, I have converted them to GIT using git svn clone, Now I want to work on sync part following are my SVN branches:
I want to make them in sync, changes which committed on SVN stage branch should be synced to GIT stage branch only and similar to other branches.
I used the following command to sync but changes are not syncing to git branch:
git reset --soft refs/remotes/stage
git svn fetch
git push --set-upstream origin stage ( I already pushed all branches to GIT server using **git push -u origin --all** )
Can anyone help me to sync these branch with their svn commits?
Execute below command on converted git repository it will give you reference remote branch names:
printf "git push origin "; git show-ref | grep refs/remotes | grep -v '@' | grep -v remotes/tags | perl -ne 'print "refs/remotes/$1:refs/heads/$1 " if m!refs/remotes/(.*)!'; echo
After that use git push origin reference_branch_name_from_above_output.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.