Can “git pull --all” update all my local branches?

前端 未结 25 2492
失恋的感觉
失恋的感觉 2020-11-22 16:33

I often have at least 3 remote branches: master, staging and production. I have 3 local branches that track those remote branches.

Updating all my local branches is

25条回答
  •  我在风中等你
    2020-11-22 17:12

    Here is a good answer: How to fetch all git branches

    for remote in `git branch -r`; do git branch --track $remote; done
    git pull --all
    

提交回复
热议问题