Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Github; compare doesn't show the same file as the one in the branch

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?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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

>Solution :

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?

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading