1- Operation process

// Connect remote repository to local repository (SSH public key association)
1.git remote add origin [email protected]:ldf-fan/project-team.git 

// Push the local repository to the master branch of the remote repository
2.git push -u origin master

// Download (clone) the remote repository code to the local terminal
3.Git Clone repository (SSH)// View the branch
4.git branch

// Switch to dev branch. If there is no dev branch, create branch and switch to dev branch
5.git checkout -b dev

// Check the status.
6.git status

// Add all local code (after modification) to the cache
7.git add .

// Commit the cached code (contents) to the history area (preferably note the changes made in this commit)
8.git commit -m "First modification"

// Switch to the master branch.
9.git checkout master

// View all local and remote branches
10.git branch -a

// Merge dev branch into current branch (content)
11.git merge dev

// Delete the local XXX branch
12.git branch -d xxx

// First pull the latest content (version) of the remote repository to the current local branch directly merge purposes to ensure that the remote repository is the latest version of the code when the local push to the remote branch (if the same file is modified, there may be conflicts)
13.git pull

// Push local code to remote repository
14.git push
Copy the code

2- Other common git commands

// View the commit log
1.Git log (writable parameter)// Check the differences between the two
2.Git diff// Push the local dev branch content to the remote dev branch
3.git push origin dev
Copy the code