From blank to commit

From /tg/station 13 wiki
Jump to: navigation, search

This is a guide to help you make your first commit to NT Station 13. The use of the words NTStation and NTStation13 is important, as the url is github.com/NTStation/NTStation13 and your page will be github.com/username/NTStation13, so it can get confusing.

  • Register with github.
  • Download and install git. Keep everything on default (MASH DAT NEXT BUTTON!)
  • Download and install TortoiseGit (When asked to pick between TortoisePLink or OpenSSH, pick OpenSSH - NOT DEFAULT)
  • Go to NT Station's repo on github.
  • Click Fork in the upper right. This will create a webpage like github.com/username/NTStation13, with username replaced by your github username. This is now your fork. It contains a clean copy of the NTStation13 master repo.
  • In the left middle, expand the drop-down box that says Branch: Master. Enter a name (without spaces) for whatever you will be working on. This will create a branch on your own fork. You will be changing things here and will later commit it to the NTStation master repo. The reason you are branching is so you can abandon projects, without having to wipe them, which you would have to do if you were changing your fork's master branch. If this sounds like space-talk then draw a rainbow and just do what I told you.
  • Once you create the fork, it should be selected in the drop-down box. If it is not, select it.
  • A little above and to the right of the Branch: Name dropdown, there is a set of buttons that reads HTTP|SSH|Git Read-Only. Select HTTP and copy the link that appears to the right. If you do not see these buttons, click on the button titled Code in the upper left. Make sure the link reads https://github.com/username/NTStation13.git where 'username' is your username. If it is https://github.com/NTStation/NTStation13.git, then you are trying to get the NTStation master repo's git url. That will not work! Make sure the url is correct.
  • Create a folder on your desktop or somewhere. Call it 'nts' or something. Right click it, select Git clone. Enter the url you copied and have git download your code.
  • Tick-tock
  • Make your code magic!
  • Tick-tock
  • Gray hair
  • Tick-tock
  • Gray hair
  • Tick-tock
  • Gray hair
  • zzz
  • Tick-tock
  • EUREKA!
  • COMMIT! Right click the main folder (where NTStation13.dme is), select 'Git commit -> "Master"'. Enter your commit log and select the files AND REVIEW THEM!!! Make sure you also edited changelog.html, remember you didn't, close the commit window, correct your mistake, and repeat the first few steps.
  • Now that you committed it, it is somewhere in the void between your computer and github... I actually don't know where the code is supposed to be right now, it is not on github tho, that's for sure. In the confirmation window, you will get a button that tells you to push the commit. Click it.
  • Push it to master, forkname, origin (ordered by input fields). Forkname is the name of the fork you made earlier. 'Master' if you skipped that step.
  • Push. enter github credentials if asked.
  • If you now open github and go to your repo (NOT THE MAIN NTStation ONE) and select the branch you pushed to in the drop-down in the left, you should see all changes to files applied there. If you open the 'commits' and 'files' tabs in the center middle, you will be able to review the commits you pushed. You can make as many commits and push-es as you want in a fork. It is however in your own repo for now, not in the main NTStation one!
  • Once ready, review your code one more time, test it and correct all issues you notice.
  • Once ready, review your code one more time, test it and correct all issues you notice.
  • Once ready, review your code one more time, test it and correct all issues you notice.
  • Once ready, review your code one more time, test it and correct all issues you notice.
  • Once ready, review your code one more time, test it and correct all issues you notice.
  • Once ready, review your code one more time, test it and correct all issues you notice.
  • Once ready, review your code one more time, test it and correct all issues you notice.
  • Once ready, review your code one more time, test it and correct all issues you notice.
  • Once ready, review your code one more time, test it and correct all issues you notice.
  • You get the idea.
  • To request that it gets added to the main NTStation repo, click the 'Pull request' button. Make sure you have the branch you want to push selected first. Enter a 'pull' log (summary of all changes) and send the pull request.
  • Your pull request is now in the NTStation pull requests list. That's right, you can now view it from a url that has NTStation in it!! Anyway, a maintainer will have to approve your pull request before it gets added to the branch, but some time, excessive whining in #nanobus and a sizable bribe might help.
  • Success! And it only took 37 steps!!
  • You should however be aware that anything else you push to this branch will be part of the pull request! That is why I told you to make a branch 30 steps ago, so you don't have to wait for the old push to get approved. This is useful for making post-"pull request" fixes and corrections to your pull request.
Contribution guides
General Hosting a server, Setting up git, Downloading the source code, Guide to contributing to the game, From blank to commit, Game Resources category
Database (MySQL) Setting up the database, Working with the database, MySQL
Coding Understanding SS13 code, Getting started with Code, SS13 for experienced programmers, Binary flags‎
Mapping Guide to mapping, Map Merger
Spriting Guide to spriting
Wiki Guide to contributing to the wiki, Wikicode, Hiding content