Git master branch will be reset

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
Post Reply
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Git master branch will be reset

Post by Graf Zahl »

An innocent looking pull request I merged today needs to be corrected due to bad line endings which cause commit conflicts on Windows. This cannot be done without resetting the branch so everybody is advised to do a clean checkout once I post a notification here that the issue has been fixed.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Git master branch will be reset

Post by Graf Zahl »

All should be ok now. Again, please make sure you do a clean checkout of origin/master after pulling next time!
User avatar
Rachael
Posts: 13562
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Git master branch will be reset

Post by Rachael »

Thank you for the warning, I would've unwittingly committed them right back after I had tested the UDMF property for 'friendlyseeblocks'.
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: Git master branch will be reset

Post by Blue Shadow »

How do you do that, precisely?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Git master branch will be reset

Post by Graf Zahl »

Do what, precisely?
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: Git master branch will be reset

Post by Blue Shadow »

The clean checkout.
User avatar
Rachael
Posts: 13562
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Git master branch will be reset

Post by Rachael »

Code: Select all

git fetch --all
git checkout -B master origin/master
Assuming you are using an actual gzdoom clone, and not a single repository that is jury-rigged together from multiple sources. If you have that kind of a setup, then you probably already know how to remove and recreate branches to serve this purpose.
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: Git master branch will be reset

Post by Blue Shadow »

Rachael wrote:Assuming you are using an actual gzdoom clone
I'm not cloning GZDoom directly. I have a fork, which what I'm cloning. I pull from upstream to update my local repository. Does this clean checkout still apply, then?
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Git master branch will be reset

Post by _mental_ »

If you were not pulled deleted commit(s) then no. IIRC attempt to pull from force pushed branch will end with error.
Blue Shadow
Posts: 4949
Joined: Sun Nov 14, 2010 12:59 am

Re: Git master branch will be reset

Post by Blue Shadow »

Okay, thanks. That means I don't need to do it, because I didn't pull those commits.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Git master branch will be reset

Post by Graf Zahl »

If you use a GUI tool the simplest way is to just move the branch label to the commit where you want it.
User avatar
Major Cooke
Posts: 8175
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Git master branch will be reset

Post by Major Cooke »

All I do is "reset branch to commit" and set it to hard using SourceTree.
Image

That's just a local branch that's not even pushed, and never will be. For compiling purposes only.
Post Reply

Return to “General”