Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old January 26, 2020, 06:34   #11
eastwind
Apprentice
 
Join Date: Dec 2019
Location: Mexico, undisclosed location
Posts: 79
eastwind is on a distinguished road
Thanks, that shows what I'm looking at that is causing my question.

I don't get why the first line (5d2e4f5) is showing up. That change was pushed to my branch then pulled to master by Nick, so why should it still be showing as a difference that's in my branch but not master?

So another way to ask my same question is, after you push a change to your private fork and then get it merged into master, what do you have to do to your private fork to clean or reset or sync it with master so it's ready for the next change?
eastwind is offline   Reply With Quote
Old January 26, 2020, 18:02   #12
eastwind
Apprentice
 
Join Date: Dec 2019
Location: Mexico, undisclosed location
Posts: 79
eastwind is on a distinguished road
I guess what I have to do is delete my fork using the web interface and recreate it after every push. If i do that it will get the same name, and my local repository will automatically retarget to the clean fork. I read something about being generous with forks, but I didn't quite know what was expected.
eastwind is offline   Reply With Quote
Old January 26, 2020, 21:10   #13
backwardsEric
Apprentice
 
Join Date: Aug 2019
Posts: 62
backwardsEric is on a distinguished road
Quote:
Originally Posted by eastwind View Post
So another way to ask my same question is, after you push a change to your private fork and then get it merged into master, what do you have to do to your private fork to clean or reset or sync it with master so it's ready for the next change?
I'm still a novice at this as well, but this seems to work better than deleting your private fork and recreating it:
  • Keep the master in your fork only for changes that were made in Angband's master fork. When new changes come out in Angband's master pull them into your master, i.e. with the git command line interface make sure you are in the master branch in your fork and run
    Code:
    git pull https://github.com/angband/angband.git
    .
  • For a related set of changes you want to make, create a branch in your fork. Usually you'd probably want the branch to be based off the master branch in your fork.
  • When you are ready to send your changes to the maintainer, push that branch to github and create a pull request for Angband from github's web interface.
  • If new changes to Angband's master come out while you're still working on a change, pull them into the master branch of your fork. In the branch for your change that's still in progress, run
    Code:
    git rebase master
    so it picks up the new changes from upstream.
backwardsEric is offline   Reply With Quote
Old January 26, 2020, 21:50   #14
eastwind
Apprentice
 
Join Date: Dec 2019
Location: Mexico, undisclosed location
Posts: 79
eastwind is on a distinguished road
Thanks, i need all the help I can get!

I tried deleting my master fork and reforking, but it didn't help - the new fork still showed everything I'd ever done, and every pull request I start to make includes every change I've ever done, not just the most recent change - even though Nick has accepted the other stuff and the delta is really just the most recent change.

So my main fork, Eastwind921/master has all this junk in it I can't clear. It says it's up-to-date with master, they're on the same commit
d3be7e2541fc12abc77d3d2f126d6c64a4ccf36b

I found some decent tutorial stuff to read, and that's helping, maybe things will become clearer in another couple of chapters...
eastwind is offline   Reply With Quote
Old January 26, 2020, 22:06   #15
backwardsEric
Apprentice
 
Join Date: Aug 2019
Posts: 62
backwardsEric is on a distinguished road
Quote:
Originally Posted by eastwind View Post
Thanks, i need all the help I can get!

I tried deleting my master fork and reforking, but it didn't help - the new fork still showed everything I'd ever done, and every pull request I start to make includes every change I've ever done, not just the most recent change - even though Nick has accepted the other stuff and the delta is really just the most recent change.

So my main fork, Eastwind921/master has all this junk in it I can't clear. It says it's up-to-date with master, they're on the same commit
d3be7e2541fc12abc77d3d2f126d6c64a4ccf36b
Did you delete both your fork on GitHub and the local copy on your computer? After I deleted both, reforked, and then followed the procedure in my post above, newly generated pull requests were clean and only had the commits from the branch I had pushed to GitHub. Before that, I saw what you see, extra commits in the pull requests which Nick was kind enough to ignore.
backwardsEric is offline   Reply With Quote
Old January 26, 2020, 22:29   #16
eastwind
Apprentice
 
Join Date: Dec 2019
Location: Mexico, undisclosed location
Posts: 79
eastwind is on a distinguished road
Ah, maybe that's it. I only deleted the one on the server - it's a small bit of bother to delete the local copy and recreate it, but I'll give that a whirl. Your posting your experience is really valuable! Thanks a lot.
eastwind is offline   Reply With Quote
Old January 27, 2020, 03:24   #17
eastwind
Apprentice
 
Join Date: Dec 2019
Location: Mexico, undisclosed location
Posts: 79
eastwind is on a distinguished road
Thanks again, your advice to create a local branch worked, and I managed to push another small fix. Getting my fork updated from the master was more troublesome, I ended up having to make a pull request against my own branch (vs the usual ones against master), and then accept it. I couldn't find another way to get the web page to sync your recent commits into my fork.

That has resulted in my branch being temporarily one commit ahead of master (the commit that pulled the changes from master to my branch). Hopefully that doesn't cause trouble later.

Next I'll see whether I can do anything to clean up the non-fatal compiler warnings I'm seeing.
eastwind is offline   Reply With Quote
Old January 27, 2020, 04:24   #18
backwardsEric
Apprentice
 
Join Date: Aug 2019
Posts: 62
backwardsEric is on a distinguished road
Quote:
Originally Posted by eastwind View Post
Thanks again, your advice to create a local branch worked, and I managed to push another small fix. Getting my fork updated from the master was more troublesome, I ended up having to make a pull request against my own branch (vs the usual ones against master), and then accept it. I couldn't find another way to get the web page to sync your recent commits into my fork.
To sync the master branch in GitHub's copy of your fork with what's in Angband's master branch, I would recommend pushing from your local copy. That would look something like:
  1. Check out the master branch in your local copy:
    Code:
    git checkout master
  2. Pull the changes into it from the Angband repository:
    Code:
    git pull https://github.com/angband/angband.git
    .
  3. Push those changes to the copy of your fork on GitHub:
    Code:
    git push https://github.com/Eastwind921/angband.git

With remotes configured, you can skip having to supply full URLs. Someone who's more familiar with this probably can recommend what a standard remote configuration would look like for this scenario and the git remote commands to run to get it.
backwardsEric is offline   Reply With Quote
Old January 27, 2020, 04:44   #19
eastwind
Apprentice
 
Join Date: Dec 2019
Location: Mexico, undisclosed location
Posts: 79
eastwind is on a distinguished road
Ok, thanks, I'll try that. I really appreciate all the hand-holding.
eastwind is offline   Reply With Quote
Old January 27, 2020, 11:23   #20
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 5,698
Donated: $40
Pete Mack is on a distinguished road
Note:
git fetch ...
is equivalent to
git checkout master
git pull ...
Pete Mack is online now   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
silly angband question #4 Sky Vanilla 15 December 5, 2016 14:24
silly angband question #3 Sky Vanilla 12 November 14, 2016 00:41
Blessing silly question Skrym Vanilla 1 November 26, 2012 12:31
Probably a silly question Mr Mushroom Vanilla 4 May 31, 2011 05:55
Silly question, but... steeg1234321 Vanilla 13 March 28, 2008 18:17


All times are GMT +1. The time now is 02:04.


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