Reputation: 17486
I have an old web application 'A' which is a running under version control of git.
I recently rewrote the whole structure, but wrote this in different place and this new files are not under version control of git. This new project is 'B'
What is a best way that I can commit 'B' to the git repository that is keep tracking of 'A'?
No contents in git repository 'A' will be needed because everything is in 'B', but I want 'B' to use the git repository that 'A' have been using.
Do I just force commit in this case?
Upvotes: 2
Views: 94
Reputation: 8236
If you delete the contents of A, then copy over the contents of B into A, you will have all of your removes, unversioned files and modifications still tracked under git.
Simply commit these changes and you'll have your history linear and correct.
Upvotes: 3
Reputation: 23265
I think you should copy B over A's working tree, then do all the commits you want in A until there's nothing left to be commited.
Upvotes: 0