== Initial submission ==

1. Install the Git client
Create a new repository on Github
3. Run the git init command in your local project directory to turn the folder into a Git-manageable repository
git init
Copy the code
4. Execute them in sequence in the local project directory
git add .  // Add the code to the local repository

git commit -m "first commit"  //(Commit to local cache. What is committed in quotes? Notes, to put it bluntly)

git branch -m main  // Github will create repositories in October 2020 using main as the main branch * (previously master)Git remote add origin git remote add origin/ / (will be filed on remote lot code of local warehouse warehouse, the address is behind the previously created after making warehouse in page have a HTTPS address above Such as "https://github.com/xiaoming/repository.git")

git push -u origin main  Git push = git push = git push = git push = git push = git push = git push = git push = git push = git push = git push = git push = git push

Copy the code

Then you’ll notice that your repository on GitHub has already submitted the code


== Subsequent submission code ==

Now if we change some files for our local project, we need to synchronize the changes with the remote repository on GitHub.

git status  // Check the status of the local warehouse

git add .  // Add the code to the local repository

git commit -m "second commit"  // Commit to local cache

git push  Git push: git push: git push: git push: git push Knowledge about branch concerned please click Liao Xuefeng git tutorial 'https://www.liaoxuefeng.com/wiki/896043488029600'

Copy the code

Commit code to remote repository successfully


== About the tag version tag ==

Let’s call the version of this project myProject_v1.00 if we’re ready to release it

Git tag myproject_v1.00 git tag myproject_v1.00 git tag myproject_v1.00 git tag Myproject_v1.00 // Push the local Tag to the remote TagCopy the code

Then you’ll find that your Github repository has a tag version of your current project

Remove the tag
Git push origin --delete Tag name git Tag -d Tag name git push originCopy the code