Your local repositories are a complete copy of the projects that are on GitHub so you can save changes locally whenever you have some. When you work locally you can make changes to hundreds of files at once and then do a single save (commit) of all of them.
You’ll see that you have changes when a number appears on the Source control button icon.
Click on Source control.
In the Source control subpanel, you will see a list of modified files. Hover over them and click the Stage changes button that appears.
Once your changes are staged, enter a commit message and click the Commit button. Your changes are added to your local repository.
To push your changes to your remote GitHub repository, click the Sync changes button that appears when there are new commits. This will pull and push any changes between your local and remote copies of the project.
You can verify that your commits are submitted correctly by opening your Urantiapedia GitHub page.
¶ Synchronizing changes between the two Urantiapedia projects
The Urantiapedia project is the development and working version of the content. The Urantiapedia-backup project contains only the content, and is synchronized with the website, so introducing changes to it is equivalent to making massive changes to the website, provided that these changes are introduced by the Administrators or accepted by the Administrators through a change request.
If your changes to the Urantiapedia project include changes to content (/output/wikijs folder) you must synchronize those changes with the Urantiapedia-backup project using any synchronization utility or simply by copying and pasting between folders.
This duplication of both projects can be a bit cumbersome, but it is designed this way for security reasons.
Once you have a sufficient number of commits submitted to your own copies of the Urantiapedia projects (forks), you can submit pull requests to the original projects so that the changes can be reviewed and merged into them. This is called a pull request in GitHub terminology.
Open each of the Urantiapedia pages on GitHub.
https://github.com/<username>/urantiapedia
https://github.com/<username>/urantiapedia-backup
Make sure you are on the main branch called master. The branch appears in a menu at the top of the file list. Normally you will only have that branch.
Select the Contribute menu below, then select Open pull request. If the menu says This branch is not ahead of the upstream master, you must first fetch the main project. See below.
Add a title to your contributions. You can also add a description.
Click Create pull request. Make a pull request for each project you have changes to.
This will send a notification to the project administrators who will merge your changes if they find no issues.
Since Urantiapedia is a team effort, it is common that at any given time your forks will be out of sync with the original projects. It is good practice to sync your forks with the original projects before any pull request.
Open any of your Urantiapedia projects on GitHub.
Click on the Sync fork option. You will be shown a menu indicating how many commits have been made to the original project that are not in your copy. In the image you can see that there are 4 commits that we do not have and therefore our copy is out-of-date (This branch is out-of-date). Simply click on Update branch to bring the changes from the original project to your copy.
Wait a few seconds while GitHub updates your copy. When it’s done, if you click on the Sync fork option again you’ll see that everything is now updated, indicating that the changes are not behind the original (This branch is not behind the upstream).
Go to VS Code.
Open the project as already explained.
In the Source control panel, go to the Commits subpanel. Click the small Fetch button and then the Pull button next to it. This action fetches and pushes changes at the same time to sync the local repository.
Sometimes changes to the Urantiapedia Tools code mean changes to dependencies. You must install or update new dependencies by running the npm install command from a terminal in VS Code. This will update the project’s dependencies.
In summary, the process on GitHub is as follows (see diagram):
The “Chief Editors” create a copy (1) (fork) in their own account of the Urantiapedia projects on GitHub: Urantiapedia and Urantiapedia-backup. They also keep these copies synchronized by means of a Sync fork or Fetch upstream (1).
“Chief Editors” create a local copy of the projects on their PC. This is done via a clone action (2) in VS Code. They also keep those local copies in sync via fetch + pull actions in VS Code (2), which download any changes to the local copy.
The “Chief Editors” make changes to the local copy of the projects and make commits (3) to their local copy to save the changes.
“Chief Editors” send their changes to their GitHub projects via push actions (4).
Then, the “Chief Editors” create pull requests (5) from the GitHub website for both projects: Urantiapedia and Urantiapedia-backup.
These pull requests from the “Chief Editors” are reviewed by an “Administrator” who is responsible for merging (6) all the changes that are correct. Any changes that are not correct will be rejected (6) and the “Chief Editors” will be notified to correct them.
When the changes are correct, the “Administrator” merges the project into the original urantiapedia-backup project and causes the changes to automatically synchronize with the website, which will appear updated in a few minutes. (7)