This one is a little complicated in what I'm trying to ask, so please bear with me.
There exists a public git repo, let's call it 'repoA'. It has a branch 'master'.
I have my own copy of the code (not forked, just downloaded and copied). I have set up my own separate repo using this code, call it 'repoB' (a non-public repo), branch master.
I work on the master branch of the code from repoB, and I have no issue making changes to the code, pulling and pushing to repoB. However, now and then, the person working on repoA may make a change to the code, add new code etc, that I want to have in my master branch from repoB that I work on. I would ideally like to merge the changes into master on repoB from repoA, with any conflicting changes defaulting to preserving my code in repoB if such a conflict occurs.
I was wondering if there was a sensible way of setting this up, and how I would go about doing so. The only work around I could think of was to manually copy repoA's master branch into a separate branch, 'branch2', on repoB everytime repoA is updated, and then merge the 2 branches. However, this sounds very long winded, and I was wondering if there is a smarter way to go about doing this.
Cheers
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…