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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T06:31:38+00:00 2026-06-07T06:31:38+00:00

I am working on local git repository and I need to push my local

  • 0

I am working on local git repository and I need to push my local git into existing svn repository. My git repository is pure local git repository, it was not init using git svn clone.

How can I import this local git repo into svn?

Preferably I’ld like to keep the git history being imported into SVN.

Currently the SVN repository is structure as:

https://svnrepohost
           /branches
           /tags
           /trunk
                  /projectA
                  /projectB
                  /newProject

What I need it is to import my git repository into the https://svnrepohost/trunk/newProject above, assuming the newProject folder is empty.

  • 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-07T06:31:39+00:00Added an answer on June 7, 2026 at 6:31 am

    I have finally solved this problem by the following steps:

    1. Setup appropriate project folder in svn to be imported to, for example http://svnrepo/svn/trunk/newProject

    2. Create a new git-svn repository

      git svn clone http://svnrepo/svn/trunk/newProject

    3. Add the git repo that we want to import as remote to the new git-svn repo

      git remote add origin ../original-git-repo

    4. Pull all the data from original-git-repo

      git pull origin master –allow-unrelated-histories

    5. Rebase local repository against svn

      git svn rebase

    6. Commit the changes into svn

      git svn dcommit

    7. Clean up the remote

      git remote delete origin

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

Sidebar

Related Questions

I'm using Git-Svn to interact with a Svn repository at work and I can't
I'm a solo developer, working in a local Git repository. For backups, I want
I have a local git repository a central repo at github. I'm working on
I'm using git-svn to work against svn repository. The layout is standard, and I
I'm using a local Git project repository, and have created a remote repository followed
I have cloned a Git project into a local Git repository. Then I have
I am working on a local git repository. There are two branches, master and
I already have a local workig space repository in /applications/mamp/htdocs/myproject/.git and i can't figure
I am working on an SVN repository and do not want to create a
I want to add local svn or git repository to my code in Xcode

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.