Help
cancel
Showing results for 
Search instead for 
Did you mean: 

Common questions about GitHub Desktop

GitHub Staff

Back in September we launched v1.0 of GitHub Desktop, a completely rewritten open-source GitHub client built using Electron. The team has been working continuously on adding new features, and there is a lot more planned down the road.

 

GitHub Desktop makes it easy to get started with using Git and GitHub, but there are still a few things that are helpful to know before you dive into crafting your first commit. The goal of this article is to answer some common questions users have when working with GitHub Desktop.

 

How can I make sure I get proper commit attribution for commits I make in GitHub Desktop?

 

To ensure you get proper commit attribution and fill up your contributions graph, you will want to make sure the email address in your .gitconfig file matches an email address in your GitHub account. You can check this directly in GitHub Desktop by going to the file menu and selecting  `GitHub Desktop` (macOS) / `File` (Windows) > `Preferences` (macOS) / `Options` (Windows) > `Git`

 

How do I merge changes in GitHub Desktop?

 

GitHub Desktop makes it easy to merge changes from one branch into another. When you go to the file menu and select `Branch` you will see two options that will perform merges — `Update from default branch` and `Merge into current branch`. The default branch (usually "master") is the base branch of your repository. The `Update from default branch` option allows you to quickly pull in new changes from "master" into a "feature" branch that you are working on. The `Merge into current branch` option allows you to merge changes from *any* branch into your current branch, so this gives you the option to merge changes from one "feature" branch into another "feature" branch.

 

How can I discard changes that I no longer want to commit in GitHub Desktop?

 

Did you make a large number of changes that no longer want to commit in your repository? Rather than going back and editing your files you can quickly discard uncommitted changes. You can right-click (Windows) or control-click (macOS) on each file in the `Changes` view and select `Discard` to discard the uncommitted changes to that file.

 

You can quickly discard *all* of the uncommitted changes to your files by right-clicking on the `X changed files` header in the `Changes` view and selecting `Discard all changes`.

 

Discarded something that you need back? You can find your discarded changes in the Trash on macOS or the Recycle Bin on Windows.

 

Why am I getting an error when attempting to switch branches in GitHub Desktop?

 

Are you seeing the following error when attempting to switch branches in GitHub Desktop?

 

2018-04-13_12-16-07.png

 

This error happens in a situation where you would lose uncommitted changes as a result of switching branches in your repository. You will need to either commit your changes in GitHub Desktop or stash them using the command line.

 

How can I ignore files in GitHub Desktop?

 

Gone are the days where you need to edit a .gitignore file to ignore specific files or filetypes. In GitHub Desktop you can control-click (macOS) or right-click (Windows) on a file in the `Changes` view and ignore it by selecting `Ignore`. You will also see the `Ignore All <.filetype Files>`, which allows you to ignore all files of that specific filetype. 

 

If you accidentally ignored a file and need to edit your ignored files list you can do this directly in GitHub Desktop by going to the file menu and selecting `Repository` > `Repository Settings` > `Ignored Files`.

 

How can I work with large files in GitHub Desktop?

 

If you try to push a file that is over 100MB in size using GitHub Desktop you will see an error message that looks like this:

 

2018-04-13_12-25-35.png 

 

To resolve this error you will need to follow our guide for removing large files from your repository. If you need to work with large files in your repository we recommend using Git LFS, which is bundled with GitHub Desktop.

 

How can I work with SSH remotes in GitHub Desktop?

 

GitHub Desktop defaults to using HTTPS remotes when cloning, but there are some scenarios where you may want to use SSH remotes. One common scenario is when you are working with a repository that contains submodules that are using SSH remotes. If you have not configured a SSH key the clone will be unable to complete due to being unable to authenticate and clone the submodules.

 

To resolve this, you will need to create a SSH key. Although you cannot directly generate a SSH key from within GitHub Desktop, if you follow the steps in this help article GitHub Desktop will automatically pick up your SSH key from `ssh-agent` and allow you to work with SSH remotes.

 

How can I configure GitHub Desktop to work behind a proxy?

 

Working behind a proxy is a common scenario in many environments. GitHub Desktop does not currently support configuring a proxy directly, but it will work with the proxy settings you set in your .gitconfig file.

 

Here is how you can configure a proxy to work with GitHub Desktop:

 

1. Open GitHub Desktop
2. Go to the file menu and select `Repository` > `Open in <command_line_application>`
3. Run the following command:

 

`git config --global http.proxy http://<proxyuser>:<proxypassword>@proxy.server.com:8080`

 

Replace "<proxyuser>" with your proxy username and "<proxypassword>" with your proxy password. Also, "proxy.server.com:8080" needs to point to the URL of your proxy server.

 

After setting that up you will be able to use GitHub Desktop behind a proxy.

 

How can I work with non-GitHub repositories in GitHub Desktop?

 

GitHub Desktop does support cloning non-GitHub repositories. If you go to the file menu in GitHub Desktop and select `File` > `Clone Repository` > `URL` you will see a text field where you can enter a .git repository URL. Enter the URL of the repository you would like to clone and GitHub Desktop will prompt you for your credentials (if needed) of the non-GitHub repository. GitHub Desktop will then clone the repository and securely store your credentials so that you can continue to work with the repository.

 

What can I do if I have more questions or issues related to GitHub Desktop?

 

If you are running into a specific issue in GitHub Desktop you can check the up-to-date list of known issues and workarounds. You can also search the GitHub Desktop issue tracker directly — it’s possible that someone else had the same issue as you and found a solution! Please feel free to open a new issue in the issue tracker if you are running into a bug that has not yet been reported. You can also reach out directly to GitHub support if you have any questions — we would be happy to help!