1

So I have a main branch (2.1) which functions of a Fork of a repository, which I synch upstream.

From that I branched my own version (let's call it VR_2.1), which I want to manually keep up to date, because there are 2 config files which I change that I need to check before merging.

Now, the VR_2.1 config file when I browse to it via web it shows all the changes I pushed. However when I compare that branch to the normal synched 2.1 I get a completely different config, the default it looks like. How is this possible?

It is my first time Githubbing, :) I looked around but couldn't find it. Tips are welcome, cheers

Victoroos
  • 13
  • 6
  • Because you are probably diffing with `..` locally. Try with `...` instead. – eftshift0 Sep 06 '22 at 11:27
  • Explanation: `..` will do a straight diff between the 2 branches.... but your PR does _not_ show that because the base branch might have _moved_ so diffing like that would include changes _not_ related to your branch. So, to get changes only related to your PR, you need to use `...` which will use the latest common ancestor between the two branches and then diff *from there*. – eftshift0 Sep 06 '22 at 11:29

1 Answers1

1

If you compare two branches on GitHub, you'll notice the URL looks something like:

https://github.com/org/repo/compare/2.1...VR_2.1

Notice the 3 dots between the branches. This type of diff shows changes in VR_2.1 since the two branches diverged.

If you change the URL to use 2 dots instead of 3 (i.e. 2.1..VR_2.1), you'll see the diff between these branches. You'll also notice the arrow between the two branch names changes from a ← to a ↔.

GitHub has documentation on comparing commits..

For more information on diff notations in git, including some helpful visual diagrams in the accepted answer, see What are the differences between double-dot ".." and triple-dot "..." in Git diff commit ranges?

cmbuckley
  • 40,217
  • 9
  • 77
  • 91