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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:21:17+00:00 2026-06-15T15:21:17+00:00

I am working on a project that uses SVN as repository which I use

  • 0

I am working on a project that uses SVN as repository which I use in combination with the Netbeans SVN plugin. I found Netbeans SVN diff lacking on showing several diffs below each other and therefore wanted to use git-svn for being able to use git gui.

The problem is now keeping both repositories in sync. My current workflow is:

  • Updating (with no local changes):

    svn up
    git stash -u # include new files too
    git svn rebase
    git stash drop
    
  • Comitting:

    git commit
    git commit ...
    git svn dcommit
    

These base cases do work, but it does not work nicely if I have local unstaged/uncomitted changes.

What is a better way to keep the local git-svn and .svn in sync?

  • 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-15T15:21:18+00:00Added an answer on June 15, 2026 at 3:21 pm

    I have found a workaround that works pretty well. The idea is to keep files updated using subversion and have git only update its history without touching any files in the working tree. git svn created a special git-svn branch which contains the latest subversion code once fetched.

    The commands to update your files, followed by a git repo history update:

    svn up
    git svn fetch
    git reset --mixed git-svn
    

    The last git reset --mixed command is necessary to ensure that git knows that your files are from the last SVN revision. Note that this command will reset any commits you made with git commit (remove commit messages, not the changes). As a solution for that, commit via svn commit and fetch your history as shown above.

    git reset --mixed git-svn somehow unables you to commit to use dcommit. After running git reset --mixed git-svn, follow the following sequence to commit using git:

    git stash
    git svn rebase
    git stash pop
    git commit ...
    git svn dcommit
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We use Subversion locally, and we're working on a project that uses a fork
I'm working on a project that uses svn, but I like the way mercurial
I'm working on a C#/VB.Net project that uses SVN and TeamCity build server. A
The project that I am currently working on at the moment uses SVN for
Im working on a patch for an open source project that uses svn. I
I'm working on a project that uses several languages: SQL for querying a database
I'm working on a project that uses the new CSS3 transform:rotate(180deg) feature. Every modern
I am working on a project that uses Java Swing. The default look and
I'm working on a project that uses dependency injection via Ninject. So far, it
I'm working on a project that uses Linq2SQL for data access. The project is

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.