This is clearly one of those "I've missed the basic principle" type issues. Luckily since everything is now "on the web" I can be very specific and not need to say "for example" (but it's the principle I want to understand).


[FYI: This got moved from "stackoverflow" because it's not about programming ... strictly true I guess ... but mostly for programmers ]

[AFYI: It seems some folks go around searching keyword matches on questions , then posting links to any that match ... so I've already found many links were people did a merge from another repo ... and it worked ...if that was the answer I'd not have posted this question]

I developing some code to drive an e-ink display. The code is at:

https://github.com/waveshareteam/e-Paper

I came across a bug and went to open an "issue" , while there I spotted there were quite a lot of "issues" and a lot of waiting "pull requests". Reading though these I realised I'd quite like some (one for now) in my version.

The one I wanted was : https://github.com/rohoog/e-Paper

(lots of fixes to avoid busy waits)

...Now I didn't do this is the methodical fashion implied here but:

```
git clone https://github.com/waveshareteam/e-Paper
git remote add rohoog https://github.com/rohoog/e-Paper
git fetch rohoog --tags
```

I then did:
```
$ git branch -r
WARNING: terminal is not fully functional
Press RETURN to continue 

 origin/Development
 origin/HEAD -> origin/master
 origin/master
 rohoog/develop
 rohoog/master
 rohoog/rohoog/array_overflow
 rohoog/rohoog/bmp-reading
 rohoog/rohoog/compile-opt
 rohoog/rohoog/no-commit-binaries
 rohoog/rohoog/wait_pin

$ git checkout rohoog/master
$ find RaspberryPi_JetsonNano > /tmp/rohoog-master-RaspberryPi_JetsonNano
$ git checkout master
$ find RaspberryPi_JetsonNano > /tmp/origin-master-RaspberryPi_JetsonNano
$ diff /tmp/origin-master-RaspberryPi_JetsonNano /tmp/rohoog-master-RaspberryPi_JetsonNano
```
The `diff` returned many differences. So next, I did:


```
$ git diff origin/master rohoog/master > /tmp/diffs

$ wc /tmp/diffs
 561055 1374852 25309866 /tmp/diffs
```
(so maybe , I'll regret trying to do this ...but let's see ..I only care about a few files)

```
$ git branch
WARNING: terminal is not fully functional
Press RETURN to continue 

* master

$ git merge rohoog/master
Already up to date.
```
OK...what? How? I can see many people have had similar "blind spots" but it feels like I've followed the guidelines. What am I doing wrong?

Well there are many thousands of lines different, I'd expect something to get changed?


OK, taking comments from @Terdon:

I think the mistake I made was:


[![The world as it really was][1]][1]


Whereas I had thought the situation I was in was :


[![enter image description here][2]][2]


So there were no new patches to add.. However when I did the "diff(1)" what I was seeing there the 99+ patches (deltas) that had happened in the original repo.

As you can see what I was expecting to pick up were patches P1-P7 (made up numbers here) because I thought the rohoog fork had rolled up all the changes into his master. I fact they are all separate, so since I want the "wait-pin" work I need patches P3-P5 , so I should merge from the tip of "wait-pin" branch.

Have I got this about right?

Any suggestions as to a simple check I should have done to ensure I spotted the "problem" (my misperception) .
(e.g. I was mostly guessing , working back from github pull request to the [wrong] git branch)



 [1]: https://i.sstatic.net/657SKrKB.jpg
 [2]: https://i.sstatic.net/7Au0Wy5e.jpg