0

I have a git repo A and git repo B, I've cloned repo A and inserted it to repo B as a directory. so now I have this folder structure:

 B
 |-- some-other-folder
 |-- A-copy

Now I've continued developing repo B and also made some changes in folder A-copy.
I also made some minor changes in repo A.

  • Is there a way I can see the differences between repo A and folder A-copy?
  • Is there a way to take all changes done in repo B related to A-copy and commit them to repo A?
CodeWizard
  • 128,036
  • 21
  • 144
  • 167
Daniel
  • 1,895
  • 9
  • 20
  • 1
    Putting a Git repository inside another Git repository is generally not a good idea unless you know what you are doing. – mkrieger1 Apr 05 '21 at 12:35
  • The short answer is yes, ill try to explain later on what needs to be done. Try to read about cherry-picking for now. you can add multiple origins to the same repo and then compare the content of them. – CodeWizard Apr 05 '21 at 12:35
  • Time to read about submodules – Mad Physicist Apr 05 '21 at 12:36
  • @mkrieger1 the other repo was a dependency that the first repo used in code, and i prefered to have it locally, and develop it in the same repo and keep it under the same version, it's all working well. I'll check the link that you sent. – Daniel Apr 05 '21 at 12:44
  • @MadPhysicist can you elaborate? – Daniel Apr 05 '21 at 12:46
  • @mkrieger1 it seems like submodules is what I've needed in the first place, but I'm not sure how to check the diff and commit A-copy changes to A yet. im guessing i'll have to use both submodules and cherry-pick. thank you for your assist I'll associate the post with the other post. – Daniel Apr 05 '21 at 12:55
  • @Daniel. I was providing you with search terms, not an answer – Mad Physicist Apr 05 '21 at 13:24
  • @MadPhysicist i figured.. you could still elaborate more :). anyway thanks to mkrieger1 i managed to find a good direction to a solution using submodules. – Daniel Apr 06 '21 at 06:37
  • 1
    @Daniel. Getting in the habit of researching for yourself is going to help you a lot more in the long term than the specific answer to this question. – Mad Physicist Apr 06 '21 at 12:41
  • @MadPhysicist. ok i accept that. I was just in a rush to find a direction, and your comment was a bit blurry, and seemed a bit condescending at the time. I appreciate the direction to submodules. – Daniel Apr 07 '21 at 06:45

0 Answers0