forked from Baystation12/Baystation12
-
Notifications
You must be signed in to change notification settings - Fork 28
Setting up Git with Tortoise Git
sabira edited this page Jun 17, 2018
·
1 revision
TortoiseGit is a GUI which integrates into Windows context menus, so instead of needing to use commands, you can use right-click menus and so on. This guide will assume you've done nothing in the setting up Git for the command line guide, so we're starting from the beginning.
- Go to https://git-scm.com/download and download the relevant version.
- Create a GitHub account if you haven't done so already. It's helpful if your username is similar to your Discord/IRC/forums name.
- Install Git, leaving everything at their defaults.
- Go to https://tortoisegit.org/download/ and download the relevant version.
- Install TortoiseGit, leaving it all at the default. Set your name and email address when asked to; these will be publicly viewable, so keep that in mind.
- Move to a folder you're happy with the code living in and right click the background and select Git Clone and enter https://github.com/Baystation12/Baystation12.git into the URL field. Press OK and it will download the repo.
- Once it's finished downloading, it's time to set up your fork, which is where you'll push your commits to. Open the newly-created folder (it should be named Baystation12), and select Settings near the bottom of the TortoiseGit sub-menu.
- Move to Git -> Remote in the menu and you'll see this screen pop up:
- Enter 'fork' into the Remote field
- Enter https://github.com/YOUR GITHUB USER NAME/Baystation12.git into the URL field
- Enable the 'Push Default' button
- Press Add New/Save
- Click 'Yes' on both of the prompts that pop up
- It's time to make some changes. For demonstration purposes, open any .dm file and make a change. Edit a name, remove some lines, whatever. It doesn't need to work. Save your edits.
- Once you're making changes for real, always compile and test your changes before opening your pull request.
- Right click your repo folder background and click Git commit -> dev to pull up the commit interface. Enable the 'new branch' option (labelled 1) and type a new branch name in the field that appears (labelled 2), and type your commit message in field 3. Once you've finished (and ensured you're creating a fresh branch), hit the Commit and Push button (labelled 4). This will pull up a log screen detailing some things, and then it will pull up the Push menu. You may be asked to log into GitHub at this point.
- Ensure your branch (labelled 1) matches the branch you've just created, that the Remote: (labelled 2) is pointing to 'fork', and then press OK (labelled 3). This will push your changes to your fork.
- Head back to https://github.com/Baystation12/Baystation12 and click the New Pull Request button (if you don't see the green button on the left hand side, which I couldn't get to show up for this guide, but you'll know it if you see it)
- Once you're in the pull request menu, first click 'Compare accross forks`, then select your repository from the list, then finally select your branch from the menu named 'compare: dev'.
- You'll now see the pull request editor gimmick, which is pretty self explanatory. The title is the title of the PR (automatically filled with the 1st commit's subject) and the body is the description, what it does, etc (automatically filled with the commit descriptions)
- Click the green 'create pull request' and you've successfully created a pull request! Wow!
- After you've opened your pull request, you might want to switch back to the base branch of the repo, dev. Right click your folder again and select Switch/Checkout in the TortoiseGit sub-menu, and select 'dev' in the 'Branch' drop-down menu. Click OK.
- To update your local copy, click Git Sync in the right-click menu and then Pull:
Documentation regarding setting up and using Git.
Making heads or tails of specific GitHub pages, for the uninitiated.
Documentation regarding tools external to DM and Git.
Standards and guidelines regarding commenting, contributor conduct and coding standards.