git basic operation _ Quick Query

  •  To delete a remote branch:

  1. git branch -a # View the list of remote branch
  2. git push origin --delete remote branch delete remote branch name #
  • Delete local branch:

  1. git branch # to view a list of the local branch
  2. git branch -d # remove the local branch branch name
  • Existing projects, pull remote branches to local:

  1. git fetch origin remote repository branch name # to leave a local remote branch
  2. the name of the local branch git checkout -b origin / remote branch name # Create a local branch and switch to the branch
  3. git pull origin remote branch # Name of the content on a local branch to pull

 

Guess you like

Origin www.cnblogs.com/sunshine-blog/p/12173273.html
Recommended