A
A
Artem00712020-08-17 15:24:29
git
Artem0071, 2020-08-17 15:24:29

How to replace the entire git project?

There was project A
There were commits in it

Project B was being developed in parallel (locally)
It also has commits

Now project A is not needed, and project B has taken its
place there is a history of commits as project A and as project B) ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2020-08-17
@saboteur_kiev

No way. Leave these projects in their separate repositories.
When you try to connect, if your branch names match (and at least the master matches), it will be tough.
If you really need to, rename project A to A_ARCHIVED and project B to project A.

S
shurshur, 2020-08-17
@shurshur

Purely theoretically possible. But there will be a tin commit in the repository, in which many files will be added, many will disappear, and some files (which were in both turnips) will change a lot.
And this is how it is done as follows: we prepare a list1 of files that will disappear, and a list2 of new files that were missing before. We delete old files (except .git), we put new ones. On list1 we do git rm for each file, on list2 - git add. Then git commit -m "message" -a. Before making the final push, it is better to carefully check what happened.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question