GitHub Desktop is a free app from GitHub that runs Git for you. The window has three parts. The top bar shows the repository, the branch, and one button that talks to GitHub: Fetch, Push or Pull, whichever is needed now. The left pane lists the files you changed, with a summary box and a commit button under it. The right pane shows the changed lines of the file you select.
Everything the app does is a Git command. Knowing which one helps when something goes wrong, and when you move to the terminal later. The pages on Git and GitHub explain the commands themselves.
File › Clone repository shows every repository your account can reach. Pick one, choose a folder on your computer, press Clone. To start from a folder of your own instead, File › Add local repository, or File › New repository, and then Publish repository in the top bar to put it on GitHub.
Edit files in any editor. Each changed file appears under Changes with a tick. Untick a file to leave it out of the commit. Select a file to see its changed lines on the right. Type a summary, then press Commit to main. The commit is on your computer only, and the top button changes to Push origin.
| In the window | The command |
|---|---|
| The Changes list | git status |
| The changed lines on the right | git diff |
| Commit to main | git add and git commit |
| Push origin | git push |
| Fetch origin | git fetch |
| Pull origin | git pull |
| History tab | git log |
Push origin sends your commits to GitHub. Fetch origin asks GitHub whether anyone else pushed; if they did, the button becomes Pull origin, and pressing it brings their commits down. Desktop fetches on its own every few minutes, so the button is usually right already.
If a push is refused because someone pushed before you, Desktop offers to fetch and merge. If you both changed the same lines, it lists the files with conflicts, you open each one in your editor, keep the lines you want, and commit. The same as on the command line, with the steps laid out.
Current branch › New branch makes a branch and switches to it. Commit on it, press Publish branch, and Desktop shows a Create Pull Request button that opens the pull request page on GitHub. After the pull request is merged there, switch back to main and press Pull origin.
Repository › Open in Terminal opens a command line in the project folder. Anything you do there shows up in the window right away. Desktop and the terminal are two views of the same repository, not two systems.
git status, Commit to main is git add and git commit.