This instructions is to have code first, then create a git repository, and then submit the local code to the remote repository operation steps:
1. Initialization
Execute in the current directory you want to submit
Git init
2. Create a remote warehouse name
git remote add gitorigin https://Github.com/***.git
3. Tell git who you are
git config--global user.email "[email protected]"--global user.name "Yourname"
Of course, this step can be completed ahead of time, if it has been set, you can skip the step, if not set up and execute push, you will be prompted to set.
4. Pull down the configuration in the warehouse first
Git pull Gitorigin Master
5. Push the local code to the remote repository
Git add-a. // Add all // Submit Staging // push to remote warehouse
After the steps above, we have completed the operation of using Git to manage the local project. Leave a message if you have any questions.
Git commits the code to the remote repository for the first time