Git is a good thing, but for beginners, this tool is not good to use, because it involves a lot of things, and these things novice for a time is incomprehensible. Unfortunately, I am a novice, so, here does not say too much about the principle of git, what kind of stage should do what kind of things, first from familiar with the common use of tools to start.
To facilitate the use of Git, we first create a repository on the GitHub. We can create one on the GitHub on the basis of the tutorial, which is very clear here without steps.
I first create a remote library "Pratice" on the GitHub. Since I already have a remote library on GitHub, I need to create a new remote library for this new repository to prevent confusion when submitting files.
By default we have a remote library: origin, but through the above operation, now we have a new remote library: Pratice. And we can also rename them by rename.
Adding a new file to the branch with add and then commit,-m the following description is very important when we need to roll back the code version. If there is a problem with remote add origin, like the above, you can use a remote RM origin to purge the previously submitted remoting library, which clears the local remote repository. Then we push Origin master and push the contents of the master branch of the remote library up. If there is a problem here, you can use pull Origin master, which is the same as the remote RM origin above.
With the above command, we can now look at our repository on the GitHub:
Oddly enough, we just wanted to push the Pratice folder up, but we found that Bluetooth was also pushed up. This is because Mater has Bluetooth in this branch, so every time you push it up, you push the Bluetooth up.
Master is our default branch, and we can delete the branch and then create a new branch: