Git master branch will be reset
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Git master branch will be reset
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.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Git master branch will be reset
All should be ok now. Again, please make sure you do a clean checkout of origin/master after pulling next time!
Re: Git master branch will be reset
Thank you for the warning, I would've unwittingly committed them right back after I had tested the UDMF property for 'friendlyseeblocks'.
-
- Posts: 4949
- Joined: Sun Nov 14, 2010 12:59 am
Re: Git master branch will be reset
How do you do that, precisely?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Git master branch will be reset
Do what, precisely?
-
- Posts: 4949
- Joined: Sun Nov 14, 2010 12:59 am
Re: Git master branch will be reset
The clean checkout.
Re: Git master branch will be reset
Code: Select all
git fetch --all
git checkout -B master origin/master
-
- Posts: 4949
- Joined: Sun Nov 14, 2010 12:59 am
Re: Git master branch will be reset
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?Rachael wrote:Assuming you are using an actual gzdoom clone
Re: Git master branch will be reset
If you were not pulled deleted commit(s) then no. IIRC attempt to pull from force pushed branch will end with error.
-
- Posts: 4949
- Joined: Sun Nov 14, 2010 12:59 am
Re: Git master branch will be reset
Okay, thanks. That means I don't need to do it, because I didn't pull those commits.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Git master branch will be reset
If you use a GUI tool the simplest way is to just move the branch label to the commit where you want it.
- 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
All I do is "reset branch to commit" and set it to hard using SourceTree.
That's just a local branch that's not even pushed, and never will be. For compiling purposes only.
That's just a local branch that's not even pushed, and never will be. For compiling purposes only.