看似git pull
只为当前分支进行获取和合并,是否有一种简单的方法可以为本地仓库中的所有分支pull
?
Try this
for remote in `git branch -r`; do git branch --track $remote; done
git fetch --all
git pull --all
You can use git-up
for this. It will automate the process of fetching and rebasing all locally-tracked remote branches. You don't have to type multiple commands again and again. You can achieve this in a single command.
Installation:
gem install git-up
Usage:
git up
This command will then fetch and rebase all the locally-tracked remote branches automatically.
For more configuration options with git-up, check out this link .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.