Pull the GitHub repository to the local git repository

Recently, I am ready to start the final project. Of course, the first step is to create a new folder.

But where to place this folder needs to be carefully considered. If it is simply placed locally, there will undoubtedly be great inconvenience in code management and version iteration, so as a developer. Git should be an indispensable tool, it can manage our code very well, and various rollback and view modification functions are very easy to use. But there is one last problem. If git only exists locally, although the function will not be affected, if something happens locally, the code will be gone. At this time, throwing it on GitHub is the most sensible choice.

So what operations are needed to get GitHub to go, here are all the explanations (assuming you have installed git locally, if not, please refer to the installation strategy)

  1. Create a GitHub account (nonsense)

  2. Create a git key, if you don’t know it, you can refer to https://www.cnblogs.com/kaerxifa/p/11164206.html

  3. If it has been created, you can go to C drive/user/./ to find the .shh file. There is a file with a .pub suffix inside, and you can get it by opening it with Notepad
    private key and public key

  4. Bind the local public key to GitHub (the main purpose of this step is to facilitate GitHub to identify your identity, otherwise the pull and push operations cannot be completed)
    Just a new one here

  5. The last step is the pull operation, you can use the built-in git pull, or you can use the graphical tool to pull (recommended)

That's all about the linkage between git and GitHub. Finally, I recommend a free git graphical tool for personal use: Sourcetree

Guess you like

Origin blog.csdn.net/weixin_43637780/article/details/122140512