git pull spits out error: There is no tracking information for the current branch.

When I try to run git pull in my branch, git spits out this error:

$ git pull
There is no tracking information for the current branch.
Please specify which branch you want to merge with.

See git-pull(1) for details

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

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


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

After that, I can simply run git pull to update code.

留言

這個網誌中的熱門文章

ng2-smart-table 自定 column 資料

C# Create An AutoComplete TextBox on WinForm

查出哪個程式佔用 port 443