Basic Git question

Archive of historical development discussions
Discussions / Development has moved to GitHub
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.

*******************************
Post Reply
Nomis101
Posts: 42
Joined: Mon Dec 25, 2017 6:37 pm

Basic Git question

Post by Nomis101 »

I know, it is a very basic question, but I already was reading a lot, asked a bunch of peoples and I still can not solve it.
I have made a branch of HandBrake some time ago. In the meantime it tells me "This branch is 224 commits behind HandBrake:master". Yes, sure it is, but how can I bring this branch up to date with current HandBrake master? I clicked on nearly every button, used every Terminal command I found in the internet, but it is still not up to date. Currently I'm using the GitHub Desktop App, because it seems more intuitive than all this tricky commands.

https://github.com/Nomis101/HandBrake
mduell
Veteran User
Posts: 8187
Joined: Sat Apr 21, 2007 8:54 pm

Re: Basic Git question

Post by mduell »

git pull
Nomis101
Posts: 42
Joined: Mon Dec 25, 2017 6:37 pm

Re: Basic Git question

Post by Nomis101 »

Thanks.
$ git pull
Already up to date.
But it was working by executing
$ git pull https://github.com/HandBrake/HandBrake
Than I've opened GitHub Desktop and clicked on "Fetch original". Now it is up to date. :-)
Deleted User 11865

Re: Basic Git question

Post by Deleted User 11865 »

mduell wrote: Tue Jun 12, 2018 1:43 amgit pull
That will pull his fork, not upstream.
Deleted User 11865

Re: Basic Git question

Post by Deleted User 11865 »

https://help.github.com/articles/adding-a-remote/

Note that in the example, they call the new remote "origin" but that's the default remote name for git, so in your local repository, origin will already be set to https://github.com/your/fork

I usually name the remote of the original project "upstream" instead.

Once the remote is added, you can do e.g.

Code: Select all

git checkout master && git pull upstream master
…to update your fork's master branch with the latest changes from upstream's (i.e. HandBrake's) master branch.
Post Reply