Force Code Synchronization to remote code
When the remote repository rolls back the Commit (2nd descriptions), the remote code is forcibly synchronized to the local
# Update all the latest code remotely, but not merge or rebase
git fetch --all
# Directly reset the data to the master, and then update the fetch.
git reset --hard origin/master
Create branch and remote Branch
# Create a local branch
Git checkout-B branch_name
# Push to remote
Git push origin branch_name
# Set Tracing (default git pull and git push, otherwise git push origin branch_name is required for update)
# If git push-u origin branch_name is used for the first push, skip this step.
# Git push -- Set-upstream origin branch_name
Git branch-u origin/branch_name
# Used by collaborators
# Update the remote branch list
Git fetch Origin
# Update a remote branch to the local machine and create a local branch
Git checkout-B branch_name origin/branch_name
# Delete a remote Branch (transferring a null pointer to the remote branch is equivalent to deleting it)
Git push origin: branch_name
# After the remote branch is deleted, other machines are synchronized.
Git fetch-P