Reputation: 41
git pull
so everything is up to date.I've tried git pull
and git pull origin master
and got everything is up-to-date. (makes sense)
git pull upstream
gave me the following message:
You asked to pull from the remote 'upstream', but did not specify a branch.
I don't know how to specify these branches, everything thing i've tried returns branch does not exist. But I feel this is the right direction..
* master
remotes/origin/HEAD -> origin/master
remotes/origin/master
I'm not sure the difference between these two branches. Or which one is the original repo to begin. I'm all out of git pull
ideas and feel there might be something else I'm missing?
Upvotes: 1
Views: 3454
Reputation: 1791
Method 1
git checkout master
git pull https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git BRANCH_NAME
Handle merge conflicts if any.
Commit the merge and push to master
git commit -m "pulled parent repo"
git push origin master
Method 2 1. Go the root directory of project. 2. Fetch the branches and their respective commits from the upstream repository. Commits to master will be stored in a local branch, upstream/master.
git fetch upstream
git checkout master
4.Merge the changes from upstream/master into your local master branch. This brings your fork's master branch into sync with the upstream repository, without losing your local changes.
git merge upstream master
Upvotes: 2