Development setup
-
Is there any documentation for creating a pull request?
-
https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork is some documentation on creating a PR.
You first need to fork triplea-game. Then you'll clone it locally. You'll create a branch to make your changes and then commit them. Then, you'll push your changes to your fork on github. At that point, if you browse to https://github.com/triplea-game/triplea/pulls, you'll see a message in the top half of the page saying that you have a branch that can be made into a PR. That message has a button that you can click on and it will take you to the PR page where there are some questions for you to fill out. Once you are done with that, you can submit it and the PR will be created.
-
@Trevan How do i keep my fork up to date?
I managed to make a commit to my own fork on github so i am one commit ahead (which i assume is what i will want to make a PR with when i get that far), but it says that i am 11 commits behind the triplea-game:master. I am sure it isn't relevant to any of my changes, but figured if i progress with this, it will be eventually.
-
@ff03k64 I only know how to keep the github fork up to date using the command line. There might be a way to do it inside of IntelliJ or some other UI but here's what you do with the command line.
In the cloned directory on your system, run the command:
git remote -vv
That should show something like:
origin git@github.com:trevan/triplea.git (fetch) origin git@github.com:trevan/triplea.git (push)
That allows you to pull/push to your fork in github.
You need to add a new "remote" that is pointing to the triplea-game repo in github so that you can grab new changes. To do that, run on of the following commands:(for https) git remote add upstream https://github.com/triplea-game/triplea.git (for git) git remote add upstream git@github.com:triplea-game/triplea.git
Now, to update the "master" branch of your fork, you need to first check it out.
git checkout master
Then you need to fetch the latest information from triplea-game:
git fetch upstream
Then you need to "rebase" your master on top of triplea-game.
git rebase upstream/master
Then you need to push master to your fork
git push master
When you create new branches to do development, you should make sure your local "master" has been rebased with the latest from upstream.
-
@Trevan
Thanks some more! While searching around for stuff on the website, I think I found a way to do it there too.Since I decided that my first PR would be that documentation, how would I put I screenshot there? I think I uploaded it to files on github, but now I can't find it to get a link.
-
@ff03k64 Here's gist on how to upload a file to github and get a url that you can add it to the markdown file: https://gist.github.com/vinkla/dca76249ba6b73c5dd66a4e986df4c8d
-
@Trevan I am glad you know your way around! I never would have found that.