Reputation:
I have created a FORK from the company's project for my team to work on. For a few weeks we cannot directly merge our code into company's master so I created this fork to work on this for now and branch from it and work ....
so if I do git remote -v
this is what I get:
origin http://github.company.com/myUserID/project.git (fetch)
origin http://github.company.com/myUserID/project.git (push)
upstream http://github.company.com/OurOrg/project.git (fetch)
upstream http://github.company.com/OurOrg/project.git (push)
BUT still I want my FORK
not to fall behind the code that others are writing and merging into Master that I forked from. So every morning I want to do this to keep my FORK updated and sync with what is in the Master that I forked from, So I do this:
git pull upstream master
git push origin master
And I think that does the job of syncing my fork and also its remote repo with what is in the Master.
So at this point my fork is up to date, now I want MY BRANCHES that I created from my FORK to be updated too.
So I did this:
git checkout my-branch-name
git pull --rebase
BUT this is the message I get when I wanted to do a git pull --rebase
There is no tracking information for the current branch.
Please specify which branch you want to rebase against.
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> my-branch-name
So now I am not sure what to do for this part.
Upvotes: 1
Views: 177
Reputation: 431
On terminal set the following
git branch --set-upstream-to=origin/master master
Upvotes: 0
Reputation: 150745
You haven't told your branch what to rebase on top of. Try this:
git checkout my-branch-name
git rebase master
This will rebase all the changes in my-branch-name on top of the changes to your local master.
Upvotes: 2