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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:37:21+00:00 2026-06-12T07:37:21+00:00

Can you undo a past commit, that has long been merged into your git

  • 0

Can you undo a past commit, that has long been merged into your git repository, via a git command? Or do you have to manually undo all the changes made in that commit?

  • 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-12T07:37:23+00:00Added an answer on June 12, 2026 at 7:37 am

    You can always just revert the changes from a single commit by doing:

    git revert <commit-id>
    

    note that this creates a new commit, undoing just those changes

    E.g. git log --oneline

    d806fc9 two
    18cdfa2 bye
    62c332e hello
    c7811ee initial
    

    Say I want to revert changes in commit 18cdfa2:

    git revert 18cdfa2
    

    We now have: git log -1 -p

    commit fb9d6627a71636503fc9a1eb4f725937c783ecee
    Author: Seth <sehe@mint12.(none)>
    Date:   Wed Oct 3 10:32:46 2012 +0200
    
        Revert "bye"
    
        This reverts commit 18cdfa27c964b66b624be1030250757b745d6866.
    
    diff --git a/a b/a
    index 0907563..3b18e51 100644
    --- a/a
    +++ b/a
    @@ -1 +1 @@
    -bye world
    +hello world
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I undo a .css('display', 'block') call so that it falls back to
Question: Normally, you can undo a sql command with rollback. BEGIN TRY BEGIN TRANSACTION
I notice that Project 2007 has the functions that allow operations that can be
I accidentally rolled back an entire changeset. How can I undo that operation, and
I'm doing a non-automated git bisect via command line. All is going well until
I run at path/test rm -r * The tutorial says that I can undo
How can I undo or revert an user entry on a QTableView popuplated by
I was just wondering how I can get a single tap to undo the
instead of popup from center can we change to another animation (eg, undo animation)?
How can I undo the most recently executed mysql query?

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.