Instructions for beginner GitHub Desktop users
GitHub Desktop is an application used to:
- Sync files between members on a team where people can be in different physical locations.
- Make sure all team members have the latest version of any file in the project.
- Propose changes to someone else's code.
- Manage the entire coding project, including:
- stable features (old, known-good code)
- work-in-progress (not-yet-good code)
- all proposed new features (new code)
- Serve as the in-between between VS Code and the Git repository server.
GitHub Desktop is not used to:
- Write code.
- Read code.
In normal class situations, the following tasks are the most frequent:
"Adding a Repo" means that you are choosing a folder of code to sync to your own machine. For example, the GWD GitHub has many folders of code (most of theme written in Markdown) that display as web sites.
In GitHub Desktop, clicking the top left corner lets you see the list of repositories on your system
3a. To see the code presented as a web page (for easy reading), right-click the top left part of GitHub Desktop's main window and select "View on GitHub".
3b. To see the Markdown file saved on your local computer but previewed as a web page: In VS Code, hit command-shift-P to open the Command Palette, start typing "preview", and select Markdown: Open Preview.
All the web page-like pages on GitHub are written in Markdown. All you need to do is open the file in VS Code and preview it as HTML.
If the master repository (online) has any changes, you need to sync your local copy by "pulling" changes from the server.
If you are making changes to a repository that you own, you can make changes and "push" them to the server by making a "commit".
The heart of open source software development is many people contributing to a project. If you want to make a change to someone else's code, you can. It is a two step process:
- "Fork" the repo. This creates a different branch where you can make changes.
- Submit a "pull request" to have your changes merged into the main branch.
This can happen if you have been working in a folder that is not the one within your Wordpress Studio/OneDrive folder. The key here is to relink GitHub with the folder that is in the proper location.
Specifically, GitHub's invisible files (used to manage the sync) must be in the theme folder you are working on.
- Backup the theme folder you have been working on (ie move it to desktop)
- Go to GitHub Desktop
- Click Add
- Choose "clone repository" from your GitHub account (first tab)
- Select your theme
- Clone it into /wp-content/themes/ inside the WP Studio folder inside OneDrive
- In GitHub Desktop, click "Open in Explorer" (macOS) or "Open in Explorer" (PC)
- Copy the files and folders in the backup from step 1
- Paste them into the window that opened in step 7
- Replace all files/folders
- Go back to GitHub Desktop
- Push
Did you submit your repo, but received a message from your teacher that the repo was "not found"?
You probably didn't uncheck the privacy box when you created the GitHub repository.
- Go to your GitHub repo's web page,
- Click Settings in the top menu bar, at right
- Scroll all the way down to the "Danger Zone"
- Edit the first option: Visibility
- Make the repo Public.
When starting WordPress Studio, you may get an error message like the screen above. This means that WP Studio tried to read the database information but could not find or open the database file. When using OneDrive to sync the WP Studio installation folder across different machines, this error occurs when WordPress tries to access a file that OneDrive has moved to the cloud.
- Open WordPress Studio
- Click the "Open in Finder/Windows Explorer" button to open the web site's root folder. (For example: One Drive/Semester4/Web-IV/WP-Studio)
- Go up one level from "WP-Studio" to "Web-IV".
- Right-click on the root folder "WP-Studio"
- Set the One Drive settings to "Always keep on this device".











