I have a A repository with a react-app and B repository with some ML codes in Github. Both repository have some commits and i want to preserve my commits in A repository and add it to the B repository. So i can continue committing on B Repository (ML). How can i do this?
I was trying to add my file to the B repository normally but it doesn't preserve commits.
Clone your Repository B
Navigate into the cloned Repository B directory and add Repository A as a remote.
Fetch the commits from Repository A.
Merge the commits from Repository A into Repository B's main branch
If there are any conflicts between the commits from Repository A and the existing code in Repository B, resolve them manually. Also keep directory structure compatible
Push the changes to Repository B.
Now, you can continue working on Repository B and commit changes as usual.