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 9197859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:09:52+00:00 2026-06-17T22:09:52+00:00

I cloned an existing svn repo off a remote server locally using git-svn’s git

  • 0

I cloned an existing svn repo off a remote server locally using git-svn’s git svn clone <orig_svn_repo_path>. I now want to setup a remote repo for only a particular branch out of several branches of the locally cloned repo say <cloned_repo>/branches/<branch_to_clone>. Is this possible to do? The rest of the repo is pretty humongous in terms of size and as there is only that particular branch that I have to work on, I’d rather just setup a remote mirror for it. Also if that is possible, how would I then update the original svn repo with the branch being worked upon and also push my changes to the remote git branch (repo) to keep it in sync with the local branch (that is updated onto the svn repo) ?

  • 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-17T22:09:54+00:00Added an answer on June 17, 2026 at 10:09 pm

    If you want to make commits to SVN (using git svn dcommit), you should not use a git clone of any git repository.

    You should instead use a git svn init command with the appropriate parameters so that only the SVN directory you’re interested in is fetched, and then a git svn fetch. You can do this as many times as you like.

    If you do a git clone of a repository which is set up to track SVN, you have an issue: git-svn modifies the body of commits it sends to Subversion via dcommit, adding in a git-svn-id line. This is a type of history rewriting. So if you have a SVN-oblivious repository which pushes to the SVN-aware one, which then pushes to Subversion itself, you’re going to have an issue when you try to do a git push the second time.

    Just to make sure we’re clear, the problem is that the first repository will rewrite history when it does a dcommit. So any new changes pulled down to another git repo from that point on will have a different commit hash, requiring forced pulls/pushes. It’s exactly like what would happen if someone were to rebase publicly-visible changes: see this SO answer.

    Fundamentally, git-svn is designed to be used with the SVN repository itself serving as the “central” repo.

    If you want a read-only copy of Subversion, never doing another dcommit (or at least not keeping the second git repo up to date after you do a dcommit from the first), then you’re fine. Just do a git clone with a refspec restricted to the branch in which you’re interested.

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

Sidebar

Related Questions

I've created a bare git repository (Core), cloned from a pre-existing repo (Production) using
I'm trying to convert an existing SVN repository to GIT using git-svn clone but
I want to clone an existing git repo for a NEW project. After the
I have cloned a remote SVN repository with git-svn. I have modified a pom.xml
I have an existing CMS svn repository CMS_REPO. Now I want to use this
I have been using both git and svn for quite some time now, and
I'm currently mirroring an existing SVN repository on Github. For the initial clone I
I cloned the git repo and placed in the document root of my nginx
I accidentally added a cloned git repository to a working copy clone of my
I've cloned a (remote) repo into Eclipse(EGit), which created a working directory for the

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.