GitHub Desktop Tips
I have been using GitHub Desktop more frequently recently, and in the process, I have stumbled across various things which helps you navigate around the user interface faster.
1. Launch from the command-line
You can launch GitHub Desktop from the command-line by running this
github command. What is especially useful about this is that if you are inside a directory containing a GitHub repository, GitHub Desktop will automatically navigate to this repository.
2. Navigate to repository
To quickly navigate to a different repository, use
Ctrl+T (on Windows) or
Cmd+T (on a Mac) to open the repository list. You can then start typing the name of the repository to filter the list of repositories by that name quickly. Highlight the repository you want and press the
Return key to open that repository. This is especially useful if, like me, you are working across many different repositories.
3. Navigate to a branch
Want to quickly switch to that feature branch you want to work on? Use
Cmd+B to open the branch list and start typing the name of the branch to filter the list of branches quickly. Highlight the branch you want and press the
Return key to switch to the branch.
4. Create a new branch
Want to create a new branch for a feature you are working on? Use
Cmd+Shift+N to open the Create a Branch dialog.
5. Open the repository directory in File Explorer / Finder
Often when working with a repository, you may want to open the directory containing the repository in File Explorer / Finder to view and operate on the files. You can do this by using the
Cmd+Shift+F keyboard shortcut.
6. Open the repository on GitHub.com
You may also want to open the repository on the GitHub website. Use the
Cmd+Shift+G shortcut to open the repository on github.com inside your web browser.
7. Open repository on command-line
How about opening the directory containing the repository on the command line so you can run git commands directly from the command-line? Use the
Bonus points for this being the same shortcut used to open the Terminal window in Visual Studio Code, so muscle memory kicks in. You can change the Default Shell in the GitHub Desktop Options (using
8. Open repository in your editor
Want to start coding? Use the
Cmd+Shift+A shortcut to open the directory inside your favourite code editor.
You can change the Default Code Editor in the GitHub Desktop Options (using
9. Go over to the dark side
Is dark mode your thing? Good news is that since version 1.2.4, you can switch between Light and Dark themes. Open the Options/Preferences using
Cmd+, and navigate to the Appearance tab.