git pull 错误:git did not exit cleanly ( exit code 1 )

执行 git pull  命令时报以下错误:

git did not exit cleanly (exit code 1)

在 IntelliJ IDEA 里有更详细的提示信息:

No tracked branch configured for branch master or the branch doesn't exist. To make your branch track a remote branch call, for example, git branch --set-upstream-to=origin/master master

大概的意思就是没有配置 master 分支的跟踪分支,或者这个 master 分支不存在。要让你的本地分支跟踪远程分支,可以执行以下命令:

git branch --set-upstream-to=origin/master master