Git常用命令

84 阅读1分钟
  1. 拉取远程分支

git remote update origin --prune

  1. 拉取远程分支并创建本地分支

git checkout -b 本地分支名 origin/远程分支名

  1. 查看分支

git branch

  1. 清除所有未提交的修改
git reset --hard;
git clean -df;
  1. 从远端拉取代码到当前分支

git pull origin 远端分支名 [--rebase]