public git repo was reset

Antoine Beaupré anarcat at debian.org
Sat Oct 17 22:13:46 EDT 2015


On 2015-10-17 02:47:09, Antoine Beaupré wrote:
> Hi,
>
> This week, I took my laptop out to the countryside, without internet
> (but with a HAM radio ;), to focus on peace and quiet and maybe work on
> borg.
>
> First off, I must apologise for the mess I created on the master
> branch. I attempted to create a master branch in my own fork with all
> the branches merged in and I mistakenly pushed that to the main repo,
> which closed all the pull requests and put all my code live at once. I
> have reverted the change and now only the --version pull request is
> there.
>
> I am at a loss at words at how to handle this... I guess I could rebase
> those branches on top of the new messed up master, or we could reset the
> master branch again. I am not sure what is the best way to proceed, but
> I can't fix this cleanly myself, as I cannot force-push to master. :(
>
> Again, apologies. Here is the rest of the mail i was hoping to send
> happily an hour ago...

So a followup on this, Thomas reset the git repository this
morning. Which means that if some of you pulled the repo between
last night (2015-10-17T02:47:09-0400) and today (12:11:23-0400), a git
remote update will force-update the remote branches, and you will need
to reset your local "master" branch, and rebase topic branches.

To reset the master branch:

git remote update
git checkout master
git reset master

To rebase a topic branch:

git remote update
git rebase upstream topic --onto origin/master

In the above, "topic" is the name of your topic branch and "upstream" is
the original branch point of your topic branch, basically where "master"
was when you created the branch. "git log --decorate" is useful to
figure that out. In fact, I use the following alias profusely for stuff
like this:

[alias]
    lg = log --graph --pretty=format:'%Cred%h%Creset %C(green)%G?%Creset%C(yellow)%d%Creset %s %Cgreen(%ar) %C(blue)<%an>%Creset' --abbrev-commit --date=relative

Sorry again for the trouble, and thanks to Thomas for fixing all of
this!

I have rerolled all my pull requests into new ones, because github
believes they were merged...

I would still welcome any feedback on the original post as well, of
course. :)

A.

-- 
Information is not knowledge. Knowledge is not wisdom.
Wisdom is not truth. Truth is not beauty.
Beauty is not love. Love is not music.
Music is the best.      - Frank Zappa



More information about the Borgbackup mailing list