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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:55:11+00:00 2026-05-27T21:55:11+00:00

A developer in my team committed his changes to the wrong remote repository. I

  • 0

A developer in my team committed his changes to the wrong remote repository. I want to remove what he pushed to this repository on the remote repository. I don’t want to change anything locally.

Therefore how can I:

  1. List the commits on the remote repository branch so that I can see which commits that have been pushed need to be removed.

  2. Remove each of these commits on the remote repository branch so that I can go back to the commit before he pushed his changes.

I am not sure if “removing” is the correct process or if it is meant to be “revert” but in the end I need the remote repository branch to be back to where it was before he pushed his changes.

  • 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-27T21:55:12+00:00Added an answer on May 27, 2026 at 9:55 pm

    Mark where that branch was last by

    git tag original-master origin/master
    

    inspect what you get from the server:

    git fetch
    
    git log --all --graph
    

    or

    gitk --all
    

    if your tag still makes sense that that’s where the remote branch should be, force push that up:

    git push -f origin original-master:master
    

    if it’s another commit, push that commit as the master:

    git push -f origin <some SHA1>:master
    

    clean up:

    git tag -d original-master
    

    update your tracking branches since the fix:

    git fetch
    

    This assumes “master” is the branch in question. Replace “master” with the proper branch name if it’s another one.

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

Sidebar

Related Questions

Let's assume that some developer in my team shelved his changes that he did
As a solo developer, I don't really need team foundation server, but I own
We have a small 3 developer team that is currently using Subversion for our
Has anyone successfully installed VS 2008 Team Developer edition on the Windows 7 beta
Has anybody any experience in using Gupta (formerly Centura) Team Developer? If so, what
Often times a developer on my team will create a new Visual Studio project
Every time a new developer joins the team or the computer a developer is
What's the recommended source control system for a very small team (one developer)? Price
During a discussion about security, a developer on my team asked if there was
I currently use VS 2008 Professional, but I'm trying to get Team System Developer

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.