Contributing

From The Cataclysm: Dark Days Ahead Wiki
Revision as of 20:24, 10 November 2017 by Soyweiser (talk | contribs) (Fixed link to contributing.md)
Jump to navigation Jump to search

For an up to date guide see CONTRIBUTING.md. Might be a bit hard to read, as it contains a lot of information. But if this page contradicts CONTRIBUTING.md, the latter is probably right.

This is a guide to setting up and using Git for the purposes of contributing to Cataclysm:DDA. This does not cover astyle, or the two spaces after sentences, or four spaces instead of indents.

First, make yourself a Github account here:

 https://github.com/join?source=header-home 

Then, download Git from here:

 https://git-scm.com/downloads

Then install Git, for our purposes we are going to tell it to use its own Git Shell, which is where you will be entering these commands.

 git clone https://github.com/CleverRaven/Cataclysm-DDA.git

cd Cataclysm-DDA

git checkout -b YourNewForkName

Then you want to make the changes to the code you just created. Once you are done, compile if you made changes to code, or run the game if you made changes to JSON, and then go back to the Git shell.

If it is your first time using git, you need to tell it who you are:

 git config --global user.name "YourGithubUserName"

git config --global user.email "YourGithubUserEmail"

Then you want to change the upstream to your own account. You can get your .git link at the top of your github page, under clone or download. It will look like this:

https://github.com/YourGithubUsername/Cataclysm-DDA.git

You change the upstream like this:

git remote set-url origin https://github.com/YourGithubUsername/Cataclysm-DDA.git

Then you add the files and commit them:

git add .

git commit

This will bring you to a VIM (I think) window. Delete the lines with # in front, and let us know what you did briefly in your commit message. When you are done, hit esc, then :wq then:

git push origin YourNewForkName

Then go to your github user page, and at the top it will say something like, "YourNewForkName was pushed a couple seconds ago" you want to hit "merge / create pull request". Fill this out with more detail than your commit message. Then hit "create pull request."