Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Development (http://angband.oook.cz/forum/forumdisplay.php?f=10)
-   -   Silly Git question (http://angband.oook.cz/forum/showthread.php?t=9798)

eastwind January 25, 2020 04:42

Silly Git question
 
What are the git URLs (for cloning) for v 4.2.0 and master?

I see many references to http://github/angband/angband and I can clone that, but I'm not sure what I'm getting or how to get the other of the two I'm interested in.

(For VS integration, which I am trying to write some documentation up for, it's important to know the URL and clone from within VS rather than the web site.)

Nick January 25, 2020 05:10

There's a branch button near the top left. By default it shows master; if you want 4.2.0, change to 4.2-release.

That said, I think if you just clone angband/angband by default you get all the branches.

eastwind January 25, 2020 05:30

I'm not using the git web page, I'm trying to figure out how to use git from within Visual Studio. So there's no pull-down for which version to get, you have to specify that via the url you clone.

Anyway, angband/angband seems to have given me master, as I was able to fetch the changes you committed today, including the one for #4236.

Hopefully I'll be able to offer up a pull request soon for the other VS compilation fixes.

takkaria January 26, 2020 00:37

VS must have a way to handle this that isn't using a URL, because URLs don't specify particular branches in git. You have a URL that allows you to clone a whole repository, which includes all branches and revisions. Then in your local copy you choose ('check out') what you want in your working directory.

Pete Mack January 26, 2020 01:12

You want angband/angband. Don't worry about other stuff; the only important git synchronization is to keep your branch synced with HEAD, and to push changes for staging at github. All other actions will be local (commit, diff, log, etc)

eastwind January 26, 2020 01:28

What I did was make a fork, Eastwind921/Angband, off of angband/angband (the master) using the web interface. But then when I cloned (which I did using Visual Studio's GitHub extension) I cloned Http://github.com/angband/angband, when I should have cloned my fork instead, which is apparently Http://github.com/Eastwind921/angband.

And so then I wasn't able to push my changes properly.

So anyone else reading, don't do that.

Try number 2 is underway using a clone of Http://github.com/Eastwind921/angband, we'll see how that works for me.

eastwind January 26, 2020 03:57

I'm still struggling with Git.

The first change got done properly and merged in by Nick.

Then I started the second change, the addition of 5 new files. I first synced my local repository, then added the files, then staged them, then stashed them, then pushed them to Eastwind921/angband.

But at that point the web client showed Eastwind921/angband being 2 commits ahead and one commit behind master - rather than 1 commit ahead as I expected. When I ran the compare, it was still showing me the 3 edited files from the prior commit as well as the 5 new files.

So I thought I should revert the second push, and I did that, and now it shows me *3* commits ahead, as the reversion didn't erase the prior push, it just made another change removing those files.

Ugh! deeper and deeper.

Does git expect me to set up a fresh fork off of master for each thing I want to commit? That's easy enough in the web client, but the work needed on the local side to download the repository, get the VS project files working, etc, is non-trivial.

What do I do from here?

Pete Mack January 26, 2020 04:33

reversion does not erase changes, just undoes them (so they still show in the lot). And you will be ahead on commits until the pull request is processed.

eastwind January 26, 2020 04:37

What does 'until the pull request is processed' mean? Nick did his thing, I thought that was all that needed to happen. Do I need to wait on GitHub to do some post-merge processing?

Pete Mack January 26, 2020 04:42

My bad. You can see the difference here:
https://github.com/angband/angband/c...wind921:master
Soat least sone change is outstanding


All times are GMT +1. The time now is 17:15.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.