0 Basic GitHub terminology, GitHub Desktop setup
Jace Royer edited this page 2023-07-21 11:38:58 -05:00

Understanding GitHub Terminology

Courtesy of Kajfik, here's a basic GitHub rundown w/ probably more information than you'll need for modding:

Repository is the whole GitHub project with all of its components.

Branch is all of the code of the project. The most important branch is the master branch which has all of the live code that's used when you visit the project's website. Now it's really bad to change code in the master branch because you can screw something up and it would affect all of the users. That's why we have secondary branches. You create a secondary branch when you basically copy all of the code from the master branch into a local copy. Then you make changes in your secondary branch so it doesn't affect the master branch if you screw something up. Once you are sure you have everything fixed and ready to go you can create a

Pull Request which means that you request to pull the changes from your secondary branch into the master branch. Once you submit a PR you can also request a review of the code. After a successful review (and a couple of complaints from Razen) your secondary branch is merged into the master branch and the changes appear on the live version.

You can (and should) submit an issue which is basically a bug report but it's better to have all of the bug reports documented in one place than to write a bug report here on Discord where it's easily forgotten. Additionally:

A fork is what you do to get your own personal copy of the code. You can do this from the GitHub page in the top-right where it says fork. Go ahead and do this to get your own copy that you can add to put your modification out there, or if you're making a PR to the main game with an improvement. Remember -- Forks will not automatically sync with the upstream (the original AD source code), but you can do that yourself through GitHub Desktop.

A commit is what you do when you want to put your code on GitHub. It's effectively all of your changes put together and shipped in a package to GitHub. Generally, I recommend using GitHub Desktop for all of this which makes it easier.

Setting Up GitHub Desktop

Now that you have a copy of the AD source code in your GitHub account, you can freely do whatever you want to it to make it your own. However, before you do that, you may want to install a GUI to contribute to your code to streamline the process. I recommend using GitHub Desktop, which you can find a download for here. Terminal/Git people, you're on your own.

Once you're in to GitHub Desktop, you should see a semi-similar screen to this. Since we want to clone into your new fork of the repository, go to File in the top left and then click Clone Repository. You should see a screen with a few different options, but ideally, you'll see [yourGithubName]/AntimatterDimensionsSourceCode on the first screen you see. Go ahead and select that, then click Clone. This puts the code on your computer for you to use. Follow the instructions after that and now you have a usable fork on your machine to modify AD!

At this stage, it is 100% worth checking out this wiki entry by Razenpok for a more detailed introduction to setting up AD for contributions or modifications.

Whenever you make changes to this copy of code, you'll see a summary of your changes on GitHub Desktop, which you can then commit to your fork on GitHub for others to see your code.