Setting up git: Difference between revisions

92 bytes removed ,  22:19, 2 October 2014
m
imported>Cheridan
(adds quick local PR checkout guide)
imported>Cheridan
Line 105: Line 105:
== 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. 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"]
Line 111: Line 111:
::url = https://github.com/tgstation/-tg-station.git
::url = https://github.com/tgstation/-tg-station.git


 
*Now add the following line:
*Now edit it to look like this:
 
:[remote "upstream"]
::fetch = +refs/heads/*:refs/remotes/upstream/*
::url = https://github.com/tgstation/-tg-station.git
::fetch = +refs/pull/*/head:refs/remotes/upstream/pr/*
::fetch = +refs/pull/*/head:refs/remotes/upstream/pr/*


*Fetch from the upstream remote.
*Fetch from the upstream remote.
*To check out a particular pull request, use Switch/Checkout and select the branch from the drop-down list.
*To check out a particular pull request, use Switch/Checkout and select the branch from the drop-down list.
Anonymous user