Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Development (http://angband.oook.cz/forum/forumdisplay.php?f=10)
-   -   Vanilla Code Questions (http://angband.oook.cz/forum/showthread.php?t=9905)

wobbly March 20, 2020 13:32

You've done something funky. Some of the changes you're trying to pull in have been in master since September 2019

DavidMedley March 20, 2020 19:08

Quote:

Originally Posted by wobbly (Post 143776)
You've done something funky. Some of the changes you're trying to pull in have been in master since September 2019

Hmm ok thanks for the tip.

DavidMedley March 20, 2020 19:11

I guess I'll have to delete this and fork anew.

DavidMedley March 20, 2020 20:50

I think I'm on the right track with github now. Question: is there a git setting to avoid updating a bunch of lines where the only change is my editor auto-trimmed some trailing whitespace?

moosferatu March 20, 2020 23:33

If it's actually trimming spaces, you'll need to configure that in your editor.

What OS are you using? Windows? Most likely, it's converting line endings -- a highly irritating problem.

https://help.github.com/en/github/us...e-line-endings

DavidMedley March 21, 2020 02:14

It's not the newlines, but thanks. It's the odd extra space or tab.

Nick March 21, 2020 03:00

Here is my recommendation for managing your own version of the angband git repository:
  1. Fork the official repo (angband/angband) using the fork button on github
  2. Clone/download this to get your own local copy
  3. Keep your master branch up-to-date with the official master branch, do not do development work on your master branch
  4. For development work, create a branch and do your work there. Once it's ready for inclusion, push it to your github repo and make a pull request
  5. The official master branch will be updated frequently. Make sure that you (fairly frequently):
    • Pull changes from the official repo and update your master (it should be just a fast-forward, since you are not developing on your master);
    • Rebase your development branch or branches against your master branch, resolving any conflicts that arise

This is how I work, and it should keep confusion to a minimum.

DavidMedley March 21, 2020 04:17

OK, good tips. I know less about version control than I probably should.

DavidMedley March 23, 2020 20:37

I got my changes into a new branch, rolled my master back (via CLI couldn't find this option on github), and can now pull in the 13 commits at the press of a button. Github gives me 3 choices for this:
- Create a merge commit
- Squash and merge
- Rebase and merge

Which do you recommend?

Nick March 23, 2020 20:54

Quote:

Originally Posted by DavidMedley (Post 143826)
I got my changes into a new branch, rolled my master back (via CLI couldn't find this option on github), and can now pull in the 13 commits at the press of a button. Github gives me 3 choices for this:
- Create a merge commit
- Squash and merge
- Rebase and merge

Which do you recommend?

If you're pulling commits into your new branch from master and want to stay aligned with it, use rebase - that will bring your branch up to date with master, and then replay your new commits onto that base.


All times are GMT +1. The time now is 07:40.

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