The branch to pull from should be selected
1、问题描述
- idea 拉取分支git pull报错 The branch to pull from should be selected

2、解决:修改git配置文件中fetch
本地仓库目录下 git配置文件config 中修改fetch
bash
fetch = +refs/heads/*:refs/remotes/origin/*

3、idea拉取origin最新分支
- 先 git fetch 获取 远程仓库最新分支信息,
- 再 git pull 拉取 远程仓库最新的分支(origin中其他分支)