Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8765379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:15:54+00:00 2026-06-13T16:15:54+00:00

Here is a simple path of what I’m doing: $ cd /newdir $ git

  • 0

Here is a simple path of what I’m doing:

$ cd /newdir
$ git clone git@github.com:... .
$ git branch -m master github
$ git svn clone svn+ssh://... .
$ git branch -m master SVN

Then I have some scripts that do what is needed before pushing to Github.

I need the SVN and github branches because the files on both branches are the same but with different content. Before pushing files to Github I add some header. The two branches are also used to allow not all files on SVN go to Github.

All updates are from SVN branch to github branch. Occasionally I would add something on github branch that is not on SVN. I’ll never send files/updates from github branch to SVN branch.

My problem 1 is that every time I do git svn fetch, a new master branch is created. How can I tell git svn fetch to use SVN local branch instead of master local branch?

After every:

$ git svn fetch

I could:

$ git checkout SVN
$ git merge master
$ git branch -d master

But does not look as a smart way of doing it.

Then I have a problem telling my local git that the local github branch is the remote/master branch at Github. The command

$ git push git@github.com:...

That worked perfectly before renaming local branches, now is not doing what I want.

So my 2 questions:

1 - Telling git svn to always use local SVN branch when getting updates from SVN server
2 - Telling git that local github branch is remote master branch at github
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T16:15:55+00:00Added an answer on June 13, 2026 at 4:15 pm

    You can not use merge with SVN based branches (read the git svn manual; it very carefully states this in multiple places). If you need to merge, do it the other way where the SVN tree is merged into other branches (but never never merge something else into the SVN tree).

    Let git svn have the master branch and if you need to do development in a separate branch, use another one for yourself (say master2). Then when you want the work in it commited to the master branch, do:

    git checkout master2
    git rebase master
    git checkout master
    git merge --ff-only master
    

    And when you add the github master repo, do it in a separate branch:

    git checkout master
    git checkout -b githubmaster
    git remote add github .....
    git pull github master
    

    And simply always do the above to pull into the github specific branch. But you’ll likely run into issues with the github server when you need to push back into the github stream after doing rebases and thus will need to be mean and use push -f to force update the github tree after a diverge.

    And ok, technically, I lied about not being able to merge into the SVN tree. But really, you’ll save a lot of headaches if you don’t. The reality is that git svn isn’t meant to be a fully integrated git system. It’s really just a “better SVN client” than SVN itself. You really can’t use git svn and expect to get the full power of git itself. Sad, but unfortunately true. I know because I’ve been down your path already and am doing what you want to do. The upshot is that you really can’t do merging and have it all play nicely together. SVN just can’t handle it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this simple code here import os path = (raw_input(Enter dir: )) f
I'm doing a pretty simple thing here, making a POST request to Django from
A Beginner's question: Here's my server side code, very simple: @GET @Path(/query) @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
here my simple code to add filename and their associated icon to virtualtreeview PFileInfoRec
All my code is here,quite simple,and I don't konw where it goes wrong. Person
Hi i've got here a simple program, but it's not working properly. When i
Please excuse me if I'm simple here, I want to create a simple widget
I have to be missing something simple here but it escapes me. After the
I think i must be missing something simple here but I can't figure out
I truly hope I've missed something simple here, but I'm running into a strange

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.