Unfortunately I wasn't able to find the answer to my specific problem through research, so I am looking for some help. The answer may be out there, but I don't have a good enough understanding to determine whether it will help me in my current situation. I am relatively new to git, and I need to get the latest changes from the repository which I forked from.
Here is what I have done prior:
Some changes have been made to the main repo, and I have been asked to continue working on the branch which I requested to be merged. I now need to pull the code from the master of the main repo, and bring it into my branch so I can continue working with a project that is up to date.
I was told to do a 'git pull origin master', however, I notice that the origin (after doing git remote -v) is my copy of the repo. Now to my question: Would the 'git pull origin master' be the correct thing to do in order to get the most recent code from the main repo into my branch that is checked out (and not merged yet)?
Just a side note: I am currently in training, so this may not be how the process usually goes, but I just want to make sure I am doing things correctly. If you need any more information to answer the question, please let me know. Thanks.
Sounds like you want to do git pull remote_repo master
where remote_repo
is the name that appears when you do git remote -v
for the remote repository.
If the remote repository doesn't appear when doing git remote -v
then you should add it git remote add upstream upstream_url
you can choose whatever name, I like upstream.