Sample Header Ad - 728x90

Can I clone a branch of an unrelated remote repo into a branch of my git repo, and keep it updated?

3 votes
2 answers
766 views
I have a local repo with some code in it in different branches. There happens to exist a git repo out in the world that has the same software, but a disconnected git history. (I don't think it matters, but I know for sure that that repo uses a different branch naming scheme than mine, so there are no conflicts.) I want to clone a specific branch of that remote repo into a new, matching branch of my local repo, and subsequently be able to update it with git pull. Is this possible, and if so... how?
Asked by mattdm (41207 rep)
Dec 13, 2021, 02:41 PM
Last activity: Jun 20, 2025, 10:09 AM