Here's what happened:
I have two remote git branches: master and feature1 . For some reason I have to use git push --force for the feature1 branch, but I did not know when I use git push --force , it also presses the master branch. Then disaster occurred when I moved the local master branch to the remote repository.
Fortunately, my local branch is not too far from the console. Basically, my remote master has two download requests combined before my local master .
So my problem is: can I reopen the retrieval request and retry? I noticed that there is a commit version for the merge request, so I worry if I just make a new pull request, will it mess up something? Ideally, I just want to repeat the merge of the two queries.
Is there any other way to recover from this disaster? I found out that --force is a really, really bad choice. --force
Update, an example of what happened:
I have the following branches:
master feature1 origin/master origin/feature1
I am merging two Auto merge pull requests using GitHub Auto merge pull requests . Then I did not get the master branch on my local machine. Thus, I think that my origin/master is the two versions behind the remote master.
Then I accidentally used git -f push , which overwrite the remote branch, and now I lost the commits from the migration requests in the remote repository.
How can I recover from it without ruining the history of other authors?
git github
Brian Sep 24 '12 at 15:55 2012-09-24 15:55
source share