查看远程跟踪的分支

git branch -vv

修改远程跟踪的分支

# git版本: 1.8+
# 设置当前分支跟踪为origin/dev
git branch --set-upstream-to=origin/dev

# 设置本地分支dev1跟踪为origin/dev
git branch --set-upstream-to=origin/dev dev1

# 简化的命令
git branch -u origin/dev
git branch -u origin/dev dev1

# git版本: 1.7
git branch --set-upstream dev origin/dev

标签: git

添加新评论