Common operations of Git commands

1. Git account configuration

git config --global user.name "nickname"
git config --global user.email "your email"

 

2. Initialize the Git directory and enter the directory to be placed

git init
git remote add origin <project address>

 

3. Clone the project

git clone <project address>

 

4. Update the project

git pull origin master
// The first time you need to add the origin master parameter, you can use git pull directly in the future

 

5. Submit the project

git pull origin master
git add .
git commit -m "remarks"
git push origin master
// After setting git push -u origin master, you can submit git push again

 

6. Create Tag

git tag -a v1.0.3 -m "release notes"

 

7. View Tag

git day

 

8. Submit Tag

git push origin --tags

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326151211&siteId=291194637