![]() The full syntax for both git push and git pull is to specify a remote name and a branch on that remote.If you clone a repository from another server, a default remote called "origin" will be set up for you.A git repository can have zero or more "remotes", which are named links to other repositories, usually on some central server somewhere.If you wish to set tracking information for this branch you can do so with:īranch 'master' set up to track remote branch 'master' from 'origin'.įor anyone who wants to understand why this happens, there are a few relevant concepts: Please specify which branch you want to merge with. There is no tracking information for the current branch. Note that origin is the name of the remote and master is the branch name.Ģ) How to see what branches available in the repository. This error will be gone if you specify the remote that you want to pull like below: git pull origin master I'm adding this answer because people might think that that's a necessary step. When you see the message There is no tracking information., run: git set-upstreamĬomputerDruid's answer is great but I don't think it's necessary to set upstream manually unless you want to. set-upstream-to=origin/`git symbolic-ref -short HEAD` If like me you need to do this all the time, you can set up an alias to do it automatically by adding the following to your. See: git checkout tag, git pull fails in branch Thankfully, the advice given by git makes that pretty easy to remember how to do. This branch tracking is set up for you automatically when you clone a repository (for the default branch only), but if you add a remote to an existing repository you have to set up the tracking yourself. Or you could set it up so that your local master branch tracks github master branch as an upstream: git branch -set-upstream-to=origin/master master You could specify what branch you want to pull: git pull origin master
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |