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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:07:43+00:00 2026-05-15T12:07:43+00:00

In my repository I got 2 branch when using git-svn $ git branch -a

  • 0

In my repository I got 2 branch when using git-svn

$ git branch -a
* master
  remotes/git-svn

Now I can see the diff with

$ git diff --name-status remotes/git-svn
M       global/library/Exception.php

How can I revert the modification?
Thanks

  • 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-15T12:07:44+00:00Added an answer on May 15, 2026 at 12:07 pm

    Try this:

    # create new branch (just in case you have some modifications in master branch)
    git checkout -b revert_wrong_commit
    # svn switch
    git reset --hard git-svn
    # undo last commit (takes the patch from the commit and unapplies it)
    git revert HEAD
    # commit the reverted changes
    git commit -a
    # switch to master branch
    git checkout master
    # merge the changes from revert_wrong_commit branch
    git merge revert_wrong_commit
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got a SVN repository copied onto my computer using svnsync. Now when I
Here's the situation: We've got a huge svn repository, which is the master (can't
I've got a git repository with two branches, master and amazing_new_feature . The latter
So i've got something like this for a repository atm. D-Hewards-MacBook-Pro:project dheward$ git branch
Today I got our svn repository cloned into git. I had some uncommitted work
I am working on a git repository with a master branch and another the
I got a Project A in repository. But in that project I'm using a
I've got a Git repository that has some files with DOS format ( \r\n
So I've got a local repository with two branches: master and shop . I've
Situation: I've got a SVN repository with lets say 100 revisions, rev. 100 being

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.