My question concerns Github :
- I have an official repo containing data, that I will call the upstream repo
- I have a fork of that official repo, made by a second github user (a second user of mine)
I want to be able to keep the fork and the upstream identical, meaning "with the same commits history".
If a commit is made on the upstream repo, I have a message in the fork saying that the fork is now 1 commit behind the upstream.
I create a PR from the upstream into the fork, and merge it. I have tried the different merge strategies, but let say I merge it using the "rebase" technique.
At this point, what I expected to have is a fork up-to-date with the upstream. It is the case, if you look at the repo content, but in term of commit history, the fork is now 1 commit behind, and 1 ahead the upstream. In fact we are talking about the same commit, but its sha changed during the merge process. So Github consider those are 2 different commits.
This wouldn't bother me, except that now, I can't repeat the process. If a new commit is made to the upstream, I create again a PR towards the fork, but this PR now has merging conflicts that cannot be solved automatically !
How can I keep my fork up-to-date with the upstream (without deleting it every time) ?
Edit : I should have been more precise, I am hoping to find a workflow with the Github API only, and without any local git repo / git CLI involved.