git fetch <remote-host-name> <remote-branch-name> Update remote code to local repository, no automatic merge, later you can compare the difference between local and online branchesgit merge <remote-host-name>/<remote-branch-name> Merge the remote code into the local repository#git pull = git fetch + git merge
#It is not recommended to use git pull directly, instead the following command is recommended
git fetch origin master
#compare changes, then merge
git diff HEAD FETCH_HEAD
git merge origin/master
git pull <remote-host-name> --tags pull remote tagsgit remote -v show all remote repositoriesgit remote show <remote-host-name> <remote-branch-name> Show information about a remote repositorygit remote add <remote-host-name> <git-url> Add a new remote repository and name it git push <remote-host-name> <remote-branch-name> Push the local branch to a remote branch that it tracks (usually both have the same name), or create a new remote branch if it doesn’t existgit push <remote-host-name> : refs/for/<remote-branch-name> Delete the specified remote branch1git push <remote-host-name> --delete <remote-branch-name> Delete the specified remote branch 2git push <remote-host-name> If the current branch has a tracking relationship with the remote branch, both the local and remote branches can be omitted and the current branch pushed to the corresponding branch on the origin hostgit push If the current branch has only one remote branch, then both host names can be omittedgit push -u <remote-host-name> <remote-branch-name> If the current branch has a tracking relationship with multiple hosts, you can specify a default host with the -u argument, so that you can use git push without any arguments latergit push --all <remote-host-name> pushes all local branches to the remote host, regardless of whether there is a corresponding remote branchgit push --force <remote-host-name> force the push to the remote hostgit push <remote-host-name> --tags Push tags