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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:21:10+00:00 2026-05-31T11:21:10+00:00

I have a main repository on SVN, which I am synchronizing with a clone

  • 0

I have a main repository on SVN, which I am synchronizing with a “clone” on Git / GitHub. Every time I do something on SVN, I run the following commands on my Git console:

git svn rebase
git push --force git@github.com:.../

I am frequently making mistakes when dealing with this setup (who knows how…). This leads to a lot of errors and merges, stashing, committing, adding, whatnot, which I am unable to resolve due to my lack of knowledge of Git. So I’m wondering, how can I revert all unwanted changes in my Git repository, overwriting everything the way it is committed on SVN trunk? I only ever want to commit to SVN. Git / GitHub should only be a copy.

I figured out that the workaround to run for my current problem is this:

git svn rebase
git add .
git rebase --continue
git push --force git@github.com:.../

These two additional steps allow me to continue working, as git won’t complain any longer. But I don’t want to keep my weird local changes. In other words, is there a command like this:

git svn "override and update"
  • 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-05-31T11:21:12+00:00Added an answer on May 31, 2026 at 11:21 am

    So it seems like you want to simply use github as a cloud backup, right?

    • Clean up your local repo to get rid of errneous changes you made
      (I’m assuming –stdlayout for the git-svn clone).
    • I suggest creating a new repository (say, mybackup) on github through their web UI.

    The commands would be:

    $ git reset --hard trunk (clean local tree)
    $ git remote add mybackup git@github.com:<username>/mybackup.git (add github remote)
    $ git push -u mybackup master (push to github)
    

    Example:

    I tried the following in a git-svn -managed repository (foo.git-svn) that I currently have.

    $ cd foo.git-svn
    $ git reset --hard trunk
    $ git svn rebase
    $ cd ..
    $ mkdir tmp.git && cd tmp.git && git init --bare
    $ cd ../foo.git-svn
    $ git remote add tmp ../tmp.git
    $ git push tmp master
    

    This pushed the master branch of my git-svn repo to a new, purely git repo.

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

Sidebar

Related Questions

I have a SVN Repository at my main PC, to which only I have
Suppose we have the following repository structure on github: company:project.git \- company:submodule.git A developer
I have main repository at github. I have created a fork. I created a
I have a git repository set up with several submodules, which creates a .gitmodules
Since version 1.5 Subversion supports to have a local caching-proxy for the main Master-repository.
Presently, we've got several main projects each in their own repository. We will have
i have a table called category in which i have main category ids and
I have a main asp.net app, which is written in asp.net 1.1. Runnning underneath
I have a main window (#1) on my webpage from which I open a
I have a 3 year old svn repo I just converted to git using

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.