git 获取远程
git fetch //获取所有远程分支,不同步
git branch -r //查看所有远程分支
git checkout -b test //创建并切换test分支
git pull origin test //拉取远程分支test到当前分支
(
git add . //添加所有内容到缓存区
git commit -m "修改 README 文件" //提交本地并添加描述
git push //提交远程仓库
)
//建立本地分支test与远程仓库分支test的跟踪关系, 并提交
git push --set-upstream origin test
git checkout master //切换主分支
git branch -d test //删除本地test分支
git push origin -d test //删除远程仓库test分支
//删除本地有但在远程库已经不存在的分支
git remote show origin
网友评论