How to "re-link" my fork to its "grandparent" repo instead of "parent" fork? #22103
-
Sorry I don’t know the correct terminology: Suppose there is a git repository by Alice, and Bob made a fork of it. Next, I made a fork of Bob’s fork. So the fork “lineage” is:
Is there a way to change the plumbing so that my fork directly tracks Alice’s original repo instead of Bob’s fork? Like this:
This way, I can choose to incorporate changes in Alice’s repo directly into my fork instead of waiting for Bob to incorporate them into his. I know forking is more of a GitHub instead of a pure git concept, but if there’s a way to do this for generic git repositories I’d like to know, too! Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Having the forks restructured would not give you automatic updates. The generic solution is:
|
Beta Was this translation helpful? Give feedback.
-
airtower-luna:
Ah that makes sense, thank you so much! ❤️ Just to confirm, would this mean that it would solely be my local repository’s |
Beta Was this translation helpful? Give feedback.
-
Yes, exactly. 🙂 |
Beta Was this translation helpful? Give feedback.
-
Makes sense. I will use this solution for my forks in this situation. Thank you so much! 😁 👏 |
Beta Was this translation helpful? Give feedback.
Having the forks restructured would not give you automatic updates. The generic solution is:
git remote add
).git fetch
).upstream
is a common name for that). If you don’t touch that branch otherwise, you should be able to fast-forward it on updates, unless Alice does a rebase.