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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:08:31+00:00 2026-05-26T04:08:31+00:00

Hi for ilustration purposes this is the tree at the server. (…) Change to

  • 0

Hi for ilustration purposes this is the tree at the server.

(...)
Change to E from user TTT
Change to D from user LLL
Change to C from user me
Change to B from user QQQ
Change to A from user TTT
(...)

I accidentally pushed C, how can I remove it from the main repository without affecting all the work my colleages pushed afterwards?

And if possible still keeping it as a local commit for myself.

  • 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-26T04:08:31+00:00Added an answer on May 26, 2026 at 4:08 am

    The command you want is git revert. It creates a commit to cancel out another commit:

    git revert <SHA1 C>
    

    You can then push that to the main repository, and the change made by the commit will be reverted, while still leaving the commit itself (and subsequent history) intact:

    - A - B - C - D - E - ... - C' - ...
    

    To continue working based on it yourself, you can then revert the revert, or cherry-pick the original commit – hopefully on a local branch so you won’t accidentally push it!

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

Sidebar

Related Questions

This question risks being a duplicate e.g. remove double quotes from a string in
I have a UITableView that gets information from a server and publishes the data
I have: IDictionary<string, IDictionary<string, IList<long>>> OldDic1; (just for illustration purposes, it is instantiated and
Fake data for illustration: df <- data.frame(a=c(1,2,3,4,5), b=(c(2,2,2,2,NA)), c=c(NA,2,3,4,5))) This would get me the
I have two tables (using table variables for illustration. You can run these directly
I know this isn't right, but for the sake of illustration I'd like to
I have this code: UIActionSheet *actionSheet = [[[UIActionSheet alloc] initWithTitle:@Illustrations delegate:self cancelButtonTitle:@Cancel destructiveButtonTitle:nil otherButtonTitles:
I have a trigger which deals with some data for logging purposes like so:
I have a query which returns a set of numbers: SELECT Sequence FROM Table1
I have this SimpleXMLElement object with a XML setup similar to the following... $xml

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.