Setting up git: Difference between revisions

Jump to navigation Jump to search
24 bytes added ,  03:02, 12 October 2014
no edit summary
imported>Cheridan
m (Adds link to Getting_Your_Pull_Accepted)
imported>Jordie0608
No edit summary
Line 28: Line 28:


* Head here: https://help.github.com/articles/set-up-git
* Head here: https://help.github.com/articles/set-up-git
* Follow the guide above, it's pretty straight-forward.
* Follow the guide above from steps 2 to 4, you can install Git for Windows if you want however it's not recommended
* Now you have Git all setup, but if you're command line illeterate like me, you'll wanna have some fancy graphics!
* Now you have Git all setup, but if you're command line illiterate like me, you'll wanna have some fancy graphics!


== Step 4 - TortoiseGit ==
== Step 4 - TortoiseGit ==
Line 42: Line 42:
* Head over to: https://github.com/tgstation/-tg-station
* Head over to: https://github.com/tgstation/-tg-station
* Click the '''Fork''' button in the top right corner.
* Click the '''Fork''' button in the top right corner.
* Experience hardcore forking action.
* The page you'll be directed to is now your fork. You'll be pushing updates here, and making pull requests to have them merged the the main (master) repository.
* The page you'll be directed to is now your fork. You'll be pushing updates here, and making pull requests to have them merged the the main (master) repository.
* Copy the HTTP URL. It's next to the '''HTTP''' '''GIT''' and '''Git Read-Only''' buttons. It'll look something like: https://github.com/NAME/-tg-station
* Copy the HTTP URL. It's next to the '''HTTP''' '''GIT''' and '''Git Read-Only''' buttons. It'll look something like: https://github.com/NAME/-tg-station
Line 88: Line 87:
* A commit is confirmed change of the files in your repo, it's how you make changes permanently to the files in your repo, so try not to commit without making sure it works (though subsequent commits can fix it).
* A commit is confirmed change of the files in your repo, it's how you make changes permanently to the files in your repo, so try not to commit without making sure it works (though subsequent commits can fix it).
* As said before, you should use different branches to separate your commits/changes.  Don't commit to master.  It should be clean, so you can fall back on it if needed.
* As said before, you should use different branches to separate your commits/changes.  Don't commit to master.  It should be clean, so you can fall back on it if needed.
* To make your commits, you need to edit the files using BYOND's inbult editing tools. Make sure to [[Coding Standards|follow coding standards]] when making your changes! When you're finished, right click the folder you're working with and choose '''Git Commit -> "[Your Branch Name]"''' (Example: Git Commit -> "My_First_Branch")
* To make your commits, you need to edit the files using BYOND's inbuilt editing tools. Make sure to [[Coding Standards|follow coding standards]] when making your changes! When you're finished, right click the folder you're working with and choose '''Git Commit -> "[Your Branch Name]"''' (Example: Git Commit -> "My_First_Branch")
* You can then select only the files you want to be committed by ticking or unticking them. You should also write a detailed commit summary, detailing what happened in that commit.
* You can then select only the files you want to be committed by ticking or unticking them. You should also write a detailed commit summary, detailing what happened in that commit.
* Click '''Ok''' and the commit will be committed to your local repo!
* Click '''Ok''' and the commit will be committed to your local repo!
Line 105: Line 104:
== Step 12 - Checking Out Github PRs Locally (Optional) ==
== Step 12 - Checking Out Github PRs Locally (Optional) ==
*'''This is a must for maintainers who need to easily test other people's code!'''
*'''This is a must for maintainers who need to easily test other people's code!'''
*Locate the section for your github remote in the .git/config file. Note that it is hidden by default. It looks like this:
*Locate the section for your Github remote in the .git/config file. Note that it is hidden by default. It looks like this:


:[remote "upstream"]
:[remote "upstream"]
Anonymous user

Navigation menu