GitHub Guide - Derpduck/L4D2-Comp-Stripper-Rework GitHub Wiki
<- (Previous) Design Goals | Viewing Changes In Game (Next) ->
GitHub Explained
GitHub is a code hosting platform for version control and collaboration, powered by Git. For anyone unfamiliar with using Git it can be confusing and difficult to use, however for the most basic and essential purposes of Git it is quite simple to use, and for contributors to this rework the workflow is very simple.
If you need any further help for anything Git / GitHub related not covered here, refer to the official GitHub documentation:
Or the official Git documentation:
Git can be used in a few different ways:
- Git GUI Client - Git with an interface, very useful for beginners or anyone that does not want / need to use a command line. There are other clients available but GitHub's own desktop application is linked here
- Git Command Line - For those that prefer to use a command line
- GitHub Web Interface - The GitHub website can be used to do most functions you will need, especially for this rework. However, files are not stored and tracked locally
Currently this guide will focus on the command line and the web interface, however the way Git works and the process that is followed always remains the same.
Definitions
There are some terms that users will need to know to understand how Git works, but it isn't necessary to fully understand how it works to use it. If you want to understand how Git works refer to the documentaion linked above.
- Repository / Repo - A project folder where all code / files for that project are stored and all history is tracked
- History - Any change made to a file is stored and tracked as a new version
- Branch - A pointer for a snapshot of changes, keeping them separate from the "main" branch until they are ready to become part of another branch
- Fork - A copy of a repo, other users can fork a repo to create their own copy of it to work on and contribute back to the original project
- Clone - A local copy of a fork
- Remote - A URL that points to the location of a repo, this can be your own repo or another user's repo
- Commit - A snapshot of the code at the time of the commit, tracking the point of a change and the contents of that change
- Pull - Retrives contents of a remote and immediately updates the locally stored repo to match it, effectivelly performing a
fetch
, followed by amerge
- Fetch - Downloads files from a remote repo, but stores the contents separately until merged
- Checkout - Switch between versions of code / branches on a locally stored repo
- Merge - Merges fetched changes / changes from other branches into a single branch
- Push - Uploads the committed contents of a local (cloned) repo to the specified remote
- Pull Request / PR - When code is pushed to a repo, if this repo is not your own it will create a pull request, which the owner of the repo must approve to merge the code, in essence requesting the repo to perform a pull on your code