> I would like to include the local repository to an existing repo in a GetHub paid private repro which I have access. There is only a readme file currently in the GHrepo. I want to include my local repo in a subdirectory of the GHrepo.
Is the local project already an existing repository?
It sounds like you want your local repository and the remote repository that is currently on GitHub to become merged together. Here's what I would recommend doing:
1. Clone the remote repository using GitHub Desktop by going to `File` > `Clone Repository` > `GitHub.com` and selecting the repository from the list.
2. Once the repository has been cloned to GitHub Desktop go to the menu and select `Repository` > `Open in Explorer/Finder`
3. Add your project files to this location
4. Switch back to GitHub Desktop
5. In the `Changes` tab you will see that your newly added project files have been added. You can now commit those changes in GitHub Desktop.
6. Once those changes have been committed click the `Push origin` button to push the changes up to your remote repository on GitHub
Your local and remote repository should now be synced.
>I installed the GHDesktop to setup my local. I have a different GH login for it. I do not see how to get the GHDesktop to recognized the private GH repro.
I'm not sure I understand the issue -- do you have multiple GitHub accounts? You can change accounts by going to `File` > `Options` > `Accounts`.
>I have three other coworkers that will need to use the GHrepo. I am not sure of the terminalogy, but would they clone that GHrepo to their local machines? How would they do that?
Your coworkers could clone the repository to their local machines using GitHub Desktop or the command line. You will need to add them as collaborators -- you can read how to do that here:
>How would they setup GHDesktop?
They can install GitHub Desktop from http://desktop.github.com and clone the repository there.
>I mistakenly created a parallel GHrepo on this private account. It has one file I used to test with. How to I get rid/delete this extra GHrepo?
You can read how to delete a repository on GitHub here:
I hope that is helpful. Let me know if you have any other questions.
... View more
@Googoogoogoose it looks like you have a number of merge conflicts in this file, and Git is preventing the revert from occurring because you would lose uncommitted changes that have not yet been committed. The `<<<<<HEAD` and `======` lines are merge conflict markers. To resolve those merge conflicts you will need to open this file in your text editor and follow our guide for resolving merge conflicts:
Once you resolve the merge conflict and save the file GitHub Desktop will recognize that the merge conflict has been resolved. You can then commit those changes and continue on with your work. I hope that helps -- let me know if you run into any issues!
... View more
@royoroyor thanks for the question! Would you be able to upload the log file from GitHub Desktop from the day you experienced this issue? The log file should show the verbose `git push` output, which should hopefully give me a better idea of what you were seeing.
To access the log files go to the file menu in GitHub Desktop and select `Help` > `Show Logs in Finder (macOS) or Explorer (Windows)`. The log files are created daily, so make sure you grab the correct one to upload. Thanks!
... View more
@dj-580U good question!
> I have installed GitHub desktop and it only shows me my personal organization/account, but I cannot switch to the org/account for git classroom.
When you log in to your GitHub account in GitHub Desktop it grants you access to all of the repositories that you have been granted access to , whether it be in your personal account or in an organization that you belong to. You can see all the repositories available for cloning by going to the menu in GitHub Desktop and selecting `File` > `Clone Repository` > `GitHub.com`.
If you are using multiple GitHub user accounts then you will need to switch accounts in GitHub Desktop from the menu (`File` > `Options` > `Accounts`). GitHub Desktop does not support working with multiple GitHub user accounts at this time.
I hope that helps explain things!
... View more
GitHub Desktop is a great tool for different collaborative development models. In this article we will be walking through using GitHub Desktop with the 'fork and pull' model. This model can be used within an organization you belong to that contains a private repository you do not have push access to but need to commit changes to, or within an open source project that you would like to contribute to. You can read this guide for more information about contributing to open source projects.
A note about the conventions used in this article:
We will be using the `master` branch when referring to the default branch of the repository. This can sometimes have a different name, like `development`.
The `upstream` repository refers to the parent repository of the fork we are creating. When we use the convention `upstream/master` we are referring to the `master` branch of the `upstream` repository.
1. Create a fork of the repository you would like to contribute to.
The first step you will need to take is to create a fork of the repository that you would like to contribute to. You can follow GitHub's guide on how to fork a repository for more information about that process.
2. Clone your newly created fork to GitHub Desktop.
You can either clone your newly created fork directly from GitHub to GitHub Desktop using the green `Clone or download` button on the repository's page, or directly within GitHub Desktop by going to the file menu and selecting `File` > `Clone Repository`.
3. Create a new `topic` branch in GitHub Desktop.
Git has a branching model that makes it easy to quickly create lightweight topic branches. Topic branches are created to implement a specific change, like a feature or bugfix. Create a new branch in GitHub Desktop from the branch dropdown with the appropriate title for the change that you are going to make. Creating topic branches like this helps ensure that the `master` branch only has code in it that you will eventually want to merge back into the `upstream/master` branch.
4. Review and commit your changes.
This is your time to contribute. Start making your changes in your favorite text editor or integrated development environment (IDE). GitHub Desktop supports a number of text editors, which means you can conveniently open your repository directly in your editor of choice without even needing to switch applications. When you have made some progress, commit those changes using GitHub Desktop.
Some notes about committing:
Did you make a large number of changes to a file but only want to commit a portion of those changes? GitHub Desktop supports partial commits, which allows you to create multiple meaningful commits.
Did you accidentally make changes that you no longer want to commit? GitHub Desktop lets you quickly discard specific changes to files. If you need to recover discarded changes they can be found in the Recycle Bin (Windows) or Trash (macOS).
5. Merge your `topic` branch back into the `master` branch.
Now that you have finished creating commits in your `topic` branch you are ready to merge them back into your `master` branch. Switch back to your `master` branch, select `Branch` > `Compare to Branch` from the file menu, and choose your `topic` branch from the branch list. GitHub Desktop will notify you of any merge conflicts, which you can then resolve in your text editor before merging.
6. Check for any new commits that have been made in the `upstream/master` branch.
You are almost ready to submit a pull request to the `upstream/master` branch. First, you will want to make sure that there are no new changes that have been pushed to `upstream/master` that you need to merge into the `master` branch of your fork.
Click `Fetch origin` in GitHub Desktop to fetch any new changes from the remote repositories (even though it only says `Fetch origin` GitHub Desktop will fetch from both the `origin` and `upstream` remotes in this instance).
Go to the `History` tab and in the `Select Branch to Compare` box choose `upstream/master`.
If everything is up-to-date then you can proceed to step 7.
If there are new commits available to merge click `Merge into master` to merge the changes from the `upstream/master` branch into your local `master` branch. GitHub Desktop will again let you know if there are any merge conflicts that need to be resolved.
Your local `master` branch is now up-to-date with `upstream/master`, and you are ready to submit your pull request.
7. Submit your pull request.
You can begin the the process of creating a pull request within GitHub Desktop by going to the menu and selecting `Branch` > `Create Pull Request`. This will launch your default browser and and take you directly to the page on GitHub where you can open a pull request.
8. Make any additional changes requested for your pull request.
The next step in the process is for a maintainer of the upstream repository to review your pull request. They may suggest some changes for you to make, and you can use GitHub Desktop to commit those changes and push them up to the `master` branch of your fork. Your pull request will automatically be updated to reflect the new commits that have been pushed.
You may also be asked to resolve merge conflicts if new changes that conflict with your proposed changes have been introduced since your pull request was opened. Simple merge conflicts that are caused by competing line changes can be resolved directly on GitHub, but more complex merge conflicts will need to be resolved locally on your machine.
9. Your pull request gets merged!
Congratulations! Your pull request has been approved and merged. Enjoy that lovely green square on your contributions graph and go ahead and find the next bug to squash.
... View more
@Zhou-Heng GitHub Desktop does support working with local SSH repositories. You likely need to force GitHub Desktop to use OpenSSH instead of GitHub Desktop's internal SSH that is bundled with the embedded Git that ships with the application. You can run the following command to set that in your `.gitconfig`:
git config --global core.sshCommand "'C:\Windows\System32\OpenSSH\ssh.exe'"
You can view this issue in the Desktop issue tracker for more information about this.
If that does not get things working for you it would be helpful if you could upload the entire log file from GitHub Desktop so that I can verify the errors you are encountering. To access the log files go to the file menu in GitHub Desktop and select `Help` > `Show Logs in Finder (macOS) or Explorer (Windows)`. The log files are created daily -- please send over a log file as an attachment from a day where you experienced the issue.
... View more
@phwumph sorry to hear you are having trouble. It looks like the repository you are attempting to clone does not exist on GitHub -- is this possibly the repository you are wanting to clone?
You can quickly clone this repository by clicking the green `Clone or download` button on the repository's page and selecting `Open in Desktop`. This will launch GitHub Desktop and allow you to choose a location to clone to.
A quick note about this error in case anyone else runs across this -- when you attempt to clone a repository that does not exist in GitHub Desktop it will throw an `authentication failed` error, which is confusing since it's not actually an authentication issue. We're working to improve these error messages to make it clearer what the actual issue is (in this case the fact that the repository does not exist).
Let me know if you have any issues cloning the correct repository.
... View more
@GandalfGrey123 thank you for the detailed screenshots, and I apologize for the delay in replying to you. I've attempted to reproduce this but have been unsuccessful thus far.
GitHub Desktop creates an `application password` in macOS's Keychain Access when you log in with your GitHub account. When you log out this entry should be removed. Could you try logging out and then logging back in to see if the entry is removed? This is the specific entry you are looking for:
`GitHub - https://api.github.com`
... View more
@GandalfGrey123 logging out of GItHub Desktop should prevent you from pushing to your repository unless you are specifically using SSH authentication for your repositories. I just tested this out on my macOS machine to verify I was unable to push after signing out. Would you mind uploading the log file from GitHub Desktop so I could take a closer look?
To access the log files go to the file menu in GitHub Desktop and select `Help` > `Show Logs in Finder (macOS) or Explorer (Windows)`. The log files are created daily -- please upload a log file as an attachment from the day where you experienced the issue.
... View more
@IamNigelFrancis here's how you can fix this:
Right-click on the repository in the repository list in GitHub Desktop and select `Remove` to remove the repository
Open File Explorer and go to your C:\ drive
Make sure you have the option to view hidden files and folders enabled
Delete the hidden `.git` directory located there
These steps will remove the repository from GitHub Desktop and delete the repository, but will not delete any of your existing files on the C:\ drive. Let me know if you run into any issues with these steps!
... View more
@gz1968 we are in the process of shipping a feature to warn about committing files over 100MB in GitHub Desktop, which should hopefully prevent these types of issues from occurring in the future. Currently it isn't possible to remove a large file in GitHub Desktop, but we do have a help article that walks through some of the available options for removing files from your repository's history. You will need to use the command line for these steps.
If you follow the steps that @Wabri shared please note that the `--hard` flag is destructive in nature -- it will delete all of the files in the commit where you committed the large file. I would recommend using the `--mixed` flag since that will leave your other files untouched in your working directory. You can then right-click on the file in GitHub Desktop and select `Discard changes...` to delete the specific large file that you created. I hope that is helpful!
... View more
@bkandala2579 it sounds like the push is succeeding via the command line but not via GitHub Desktop. If you are continuining to encounter this issue I would be happy to debug it further to see if there are any underlying errors that are causing the push to fail.
Could you upload the log file from GitHub Desktop to see if that gives some more information about this issue?
To access the log files go to the file menu in GitHub Desktop and select `Help` > `Show Logs in Finder (macOS) or Explorer (Windows)`.
The log files are created daily -- please upload a log file as an attachment from a day where you experienced the issue. Thanks!
... View more
@victoriaakelly great question! Our training team put together a tutorial video that may be helpful for you. We also have some GitHub Desktop help documentation available for you to reference. Here's a basic workflow using GitHub Desktop:
1. Make changes in your project using your IDE/text editor
2. Switch back to GitHub Desktop -- you should see changed files in the `Changes` tab in the left sidebar
3. Commit those changes in the bottom-left corner of GitHub Desktop. Make sure to enter a commit summary!
4. Click the `Push origin` button to push the changes up to the remote repository on GitHub. If you have not yet created a repository on GitHub you will see a `Publish repository` option that will allow you to create the remote repository.
You've now pushed your changes up to GitHub. If you encoutner any errors, please let me know! I would also recommend reading through some of our recommended resources for getting started with Git and GitHub. I hope that helps!
... View more
@NIhaalknight87 this is a known issue that can occur with GitHub Desktop. This error is usually caused by your network blocking the attempt by Windows to check the revocation status of a certificate, which then causes the whole operation to error. You can find a workaround for this issue here:
If you have any questions about the workaround, please let me know.
... View more
@benehudson we have a help guide for how to publish a repository to GitHub using GitHub Desktop here:
If you have any specific questions about this process, please let me know!
... View more
> Does this new Github Desktop version still work with private repositories on BitBucket? It does support working with non-GitHub repositories. If you go to `File` > `Clone repository` you will `URL` option where you can insert an .git URL to clone. Once you click `Clone` you will prompted for your Bitbucket credentials (if needed). >If so, is there a procedure documented for upgrading my GitHub for Windows so I still maintain my connection to my existing repository? There isn't a way to directly import repositories from the classic version into the new, but what I recommend is to drag-and-drop your repositories directly in. That is the quickest way to add them in bulk. If you are adding a Bitbucket repository you will likely be asked for your credentials again when pushing or pulling, but everything else should work without issue.
... View more
Good question @probeman! You mentioned that you are using the `Sync` button, which means that you are using an older version of GitHub Desktop that is no longer being updated. There is an entirely rewritten version available for download that no longer has the `Sync` button, but instead has separate`pull` and `push` actions (which is what `Sync` did). In the new version you will also see an indicator showing the number of commits that need to either be pulled or pushed: This way you will know if you need to pull down any new changes prior to pushing your local changes up to the remote repository. Hopefully that is what you are looking for!
... View more
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? 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: 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!
... View more