How to use GitHub for Windows 2.0 with non-GitHub

2019-08-07 06:52发布

问题:

I just installed (as opposed to update) GitHub for Windows 2.0 and for the life of me I cannot find how to use it with non-GitHub repositories. In the past I have done this without issues using this guide. However with version 2.0 the layout has changed and I cannot find a UI to clone a repo that is not from GitHub. I guess I have to drop to the command line but I have no idea how to use git that way.

回答1:

As you suggested, you can clone the repository with Git on the command line. To do so you can execute the following steps:

  1. Start the Git shell (Start menu->GitHub, Inc->Git Shell on Windows 7, I'm not familiar with Windows 8 but I think it will show up when you type "Git Shell" on the start screen)
  2. Make sure you are in the GitHub directory (C:\users\\Documents\GitHub). Otherwise use the cd-command to navigate there.
  3. Use the clone command git clone user@domain.com:/path/repository.git with the clone-url for the project you want to add. (More information about cloning)
  4. Start GitHub for Windows and go to tools and options->Options
  5. Click Scan for repositories, if everything went right your cloned project shows up.
  6. Make sure it is selected and click Add