Git help thread

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.

Re: Git help thread

Postby Nash » Fri Feb 03, 2017 9:59 pm

I added some tags to GZDoom-GPL and now when I build the executables, I no longer get the commit number appended to the version string (for example, in the INI, it says GZGZPL-2.3.2 instead of GZGZPL-2.3.2-xxxx-yyyyyyyy (x is the build number and y is the commit ID). What did I do wrong?
User avatar
Nash
AKA Nash Muhandes! Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: Git help thread

Postby Rachael » Fri Feb 03, 2017 11:18 pm

When you build on a tag, you will not see those numbers.

Go into your repository and do "git describe --tag". This is by design, and ZDoom actually takes full advantage of this for real release versions. (The commit numbers are confusing as fuck if you have no idea what git is or how it works, so for regular releases it actually makes sense to leave them out)

You can tag your history to alleviate this problem if you'd prefer your tags to appear commits back.

Or - just make your first post-tag commit. You will then have a tag that says v2.3.2-1-xxxxxxx.
User avatar
Rachael
^ walking stack of unfinished projects ^
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: Git help thread

Postby Nash » Sun Feb 05, 2017 4:38 am

When doing a Pull, is there a way to only do the merge up to whatever Tag Graf added last (let's say 2.4pre), instead of anything past beyond that? My idea is to merge only up to the most recent tag, build and release an official version of GZGPL, and THEN continue with the devbuilds.

Sneak edit: I am dumb and just realized I've already asked this before and answered it myself even
Last edited by Nash on Tue Feb 14, 2017 4:50 am, edited 1 time in total.
User avatar
Nash
AKA Nash Muhandes! Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: Git help thread

Postby Rachael » Sun Feb 05, 2017 6:28 am

This is tricky, without messing up your own repository.

However, if you want all of Graf's tags, you can do this:
Code: Select allExpand view
git fetch -t https://github.com/coelckers/gzdoom
git merge tags/g2.3.2
git push --tags


If you do not want all of Graf's tags, it gets a lot more tricky:
First, you need to find out what commit ID the tag is on. In the case of g2.3.2 the SHA-1 is a1026ff03762bd30f0e5f5e076c7acdd46b819c3 - so -
Code: Select allExpand view
git fetch https://github.com/coelckers/gzdoom
git merge a1026ff03762bd30f0e5f5e076c7acdd46b819c3
git tag -a gpl2.3.2
git push --tags
User avatar
Rachael
^ walking stack of unfinished projects ^
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: Git help thread

Postby Graf Zahl » Sun Feb 05, 2017 7:04 am

This stuff is actually a lot easier with a GUI frontend, you fetch the repository you need to work with, make sure you checked out the head of your branch and then pick the tag you want and merge it it. This can become quite messy with the command line if you do not precisely know what to do.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Git help thread

Postby Major Cooke » Sun Feb 05, 2017 8:02 am

Two such recommendable guis are GitKraken or SourceTree.
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: Git help thread

Postby Rachael » Sun Feb 05, 2017 8:32 am

Most people use TortoiseGit, anyway. :P
User avatar
Rachael
^ walking stack of unfinished projects ^
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: Git help thread

Postby Graf Zahl » Sun Feb 05, 2017 8:45 am

I can't stand SourceTree, I had to deal with it too much on my work Mac, TortoiseGit is a lot better and far more straightforward to use.
And at some time they added mandatory registration when I stopped upgrading because I saw no point in that.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Git help thread

Postby Rachael » Sun Feb 05, 2017 8:53 am

I do post command-line git commands for a very good reason, though:

First, it's worth it to learn them, period - they offer a flexibility you just cannot find in most GUI's.

Second, and most important - they are universal. No matter what Git program you have installed, they will work the same with all of them (since GUI gits all fork from the mainline Git, anyway). I dare not make assumptions that Nash, for example, has TortoiseGit installed - because if I am wrong then the instructions that I post for him will be incorrect, also.
User avatar
Rachael
^ walking stack of unfinished projects ^
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: Git help thread

Postby Nash » Tue Feb 14, 2017 4:47 am

Thanks Rachael... I'm using TortoiseGit but I figured it out based on your instructions, it was straightforward to translate for the most part. :D

So what's up with the red X's on the Github lately? It says "AppVeyor build failed" on all of them.
User avatar
Nash
AKA Nash Muhandes! Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: Git help thread

Postby Graf Zahl » Tue Feb 14, 2017 5:57 am

I registered the project for AppVeyor, but so far haven't managed to set it up properly so that it can build successfully, because I got sidetracked by some more pressing issues. It would be nice if someone who already had some experience doing this stuff could help out, because right now there's more important things I have to deal with than setting up the environment
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Git help thread

Postby Gez » Sat Mar 04, 2017 5:22 pm

Not exactly Git help, but I'm not sure whether it's a bug or not and it's the most appropriate thread for compilation issues I think. Using GZDoom git commit cfafbfe4f2284a047babd457ac914e79ff82ea14, I get those:

Spoiler:
Gez
 
 
 
Joined: 06 Jul 2007

Re: Git help thread

Postby Edward-san » Sat Mar 04, 2017 5:56 pm

Are you sure you changed nothing about the CMake program, like an update? The code indicated by the errors is there since 2008...
Edward-san
Mathematics is the language with which God has written the universe. (Galilei)
 
Joined: 17 Oct 2009

Re: Git help thread

Postby Gez » Sat Mar 04, 2017 6:29 pm

had an oooooooold CMake that didn't know about Visual Studios newer than 2008, so I deinstalled it, installed the latest stable fresh from the CMake page (that would be 3.), and ran it on a pristine, new, devoid of any remaining old file, GZDoom directory.

I got rid of the error by deleting the offending lines, and then a quick grep through the entire directory found a single instance of /GR, in re2c, just after a comment saying that RTTI is required. So whatever, it's late and as long as things stop inventing dumb pretexts for not working I'm happy.
Gez
 
 
 
Joined: 06 Jul 2007

Re: Git help thread

Postby Nash » Sat Mar 11, 2017 10:22 pm

When you go back to some old commits and "reset master to this" using TortoiseGit ... are the future commits truly wiped? So if I reset, then do a new commit from that point, that other stuff is gone for good right?
User avatar
Nash
AKA Nash Muhandes! Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

PreviousNext

Return to Editing (Archive)

Who is online

Users browsing this forum: No registered users and 1 guest