build GitHub
First, look at yourself when you have an account, no account to https://github.com/to register git account.
Second, if you already have a git account, you need to download the Windows installation package, address: http://git-scm.com/download
Three, with the installation package file directly after double-click installation (because the download is an online installation package, so it will take a little time).
Such as:
Four, after the installation, there will be two shortcuts on the desktop, such as:
The first is a shortcut to Git's graphical interface, and the second is a git command-line operation shortcut;
In the top right corner, click Create your own code Vault:
Such as:
After clicking Create, the following interface appears, and we fill in our code information according to the instructions:
Click on the Big green button below "Create Warehouse" and go to the next step,
We must remember this https://github.com/Chineseqiangzi/RenameMusic.git address, which will be used many times later.
The next step is to click on the git shell shortcut and start by cloning the repository we created on git locally.
① use ssh-t [email protected] command to check if the convention is correct
Indicates a successful connection to the GIT server.
② the next step is to clone the created library, when we find the GitHub Folder Discovery folder below is empty, such as:
Enter the following code clone our GitHub repository: Git clone https://github.com/Chineseqiangzi/RenameMusic.git
The results are as follows:
At this point we'll find a folder under GitHub's default folder. As follows:
At this point we have succeeded in cloning the warehouse on GitHub.
This time the folder is the equivalent of our workbench. I copy the code files I have written to this folder, such as:
③ Next we're going to choose the files uploaded to the GitHub repository,
We need to execute the following statement
git Add. (Upload all files in this directory, note the add and '. ') There are spaces between them)
If we need to upload a file separately, simply replace it with the name of the file.
Example:git add Program.cs (which is a separate upload Program.cs file)
④ Next commit the code using the following command:
Git commit-m ' first_commit '
When using SVN or TFS, we need to give the version control tool a description of what we have done with the code when we commit the code.
Add a description using the command git commit-m ' first_commit '
Note: You may get an error when using it, for example, the resolution is also commented in the picture
⑤ at this point we will see that our local source code files have been created in the GitHub repository, such as:
⑥ is immediately followed by the creation of a remote repository at our source code address: Https://github.com/Chineseqiangzi/RenameMusic.git
The command is as follows:
git Remote add Origin https://github.com/Chineseqiangzi/RenameMusic.git (create a remote repository named origin)
But on my local computer, but the error, the result is as follows:
The solution is as follows:
Locate the Gitconfig file for the following address
Delete the file from your remote node:
Then execute the Create Remote Warehouse command and submit the local Origin branch to master. Results such as:
⑦ then we finished the entire source code submission to GitHub, and then we could see our own source of code on GitHub.
GitHub environment construction and simple and practical