Contribution Guide - Global-Conflicts-ArmA/gc-reforger-missions GitHub Wiki
Description
This covers using GitHub and its desktop app to contribute missions to GC.
Setup
First of all, you will need to sign in to GitHub or create an account if you don't have one already.
Also visit https://desktop.github.com/download/ to download GitHub desktop, and run the installer.
Once installed, click Sign in to GitHub.com and use the same account you created earlier to authenticate your GitHub desktop app with your GitHub account.
Forking gc-reforger-missions
While logged in to GitHub, visit https://github.com/Global-Conflicts-ArmA/gc-reforger-missions and click fork.
Click create fork in the bottom right. This creates a copy of the GC Reforger missiosn repository on your personal account which you can commit to.
Downloading your repo and adding it to the workbench
In the GitHub desktop app, click Clone a repository from the internet, then choose your fork of gc-reforger-missions in the list.
Choose that you want to contribute to the parent project.
You have now downloaded your copy of the repository. To find where this is on your machine, click Repository -> Show in Explorer to open the folder in your windows explorer. Make sure it not not in a OneDrive folder.
Next, open the ArmA Reforger Tools.
In the bottom left, click Add Project -> Add Existing Project. Now navigate to the copy of the repository we cloned a moment ago, and double-click the addon.gproj file. Once that's done, you should see Global Conflicts Missions in the list, and you can work in the workbench on the addon like normal from here. Be sure to follow the guidelines outlined in the repository readme: https://github.com/Global-Conflicts-ArmA/gc-reforger-missions
Committing
Once you've worked on your mission and it is ready for submission, open GitHub desktop. You should see a list of changes shown on the left side of the window. In the bottom left, enter your mission name (i.e. COOP (12-24) Example by arc) and commit to master.
The commit now exists on your local git. To push it to your GitHub repository, simply click Push Origin at the top of your screen.
Opening a pull request
In the GitHub website, visit your fork of the missions repository. You should see that your branch is 1 commit ahead of the main repo. Under this notification, click contribute -> Open pull request.
Add a title with your mission name, and put any information that we need to know in the description to review your mission. Click create pull request, and then your part is done - we'll merge and release your mission when it's good to go.
We may leave comments on the pull request itself to request changes, but if you don't pay attention to this we'll just ping you in discord eventually. Reviewers may also sometimes make their own adjustments to the PR, in this case make sure to fetch + pull in GitHub Desktop before making additional changes.
Later: keeping your branch up to date
When you come to making your next mission, you may find the repo has been modified by others. To get up to date, visit your fork of the missions repository in the GitHub website. Similarly to when we opened the pull request, you will see a notification that your branch is so many commits behind the main repo. Click Sync Fork to get your branch updated.
Now open GitHub Desktop. At the top, where you previously clicked 'push origin' to push your commits, you should see 'pull origin'. Click this to pull the latest changes that you just synced on the website to your local machine.