Home > Enterprise >  How to pull updates from a specific branch using git
How to pull updates from a specific branch using git

Time:10-09

I am not an expert in git.

I have coded the following:

PS C:\Users\xxx\Desktop\Python Yamed> git branch
  explore
* master

I would like to pull the updates from the branch explore

I tried git pull but this is the message i get:

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=<remote>/<branch> master

I also tried

git pull origin explore

but i get an error as follows:

PS C:\Users\xxx\Desktop\Python Yamed> git pull origin explore
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Some information that might be helpful:

PS C:\Users\xxxx\Desktop\Python Yamed> git remote -v

YakeeyData      https://github.com/yakeey/yk-estimate.git (fetch)
YakeeyData      https://github.com/yakeey/yk-estimate.git (push)
Yakeey_Data     https://github.com/yakeey/yk-estimate.git (fetch)
Yakeey_Data     https://github.com/yakeey/yk-estimate.git (push)

CodePudding user response:

Using git, you can add as many upstream repo address you want with git remote add (from "Git Basics - Working with Remotes").

In your case, there is no upstream repo called origin. It seems to be called YakeeyData instead.

So you just need to do a git pull YakeeyData explore

Underneath, this command will result in the following two commands

git fetch YakeeyData explore && git merge explore
  • Related