Jeroen Kransen
Jeroen Kransen

Reputation: 1471

How do I restart a git project, and keep its history?

Much like this question, but here I do care about forkers and history.

I restarted a project from scratch, and now I want to append it as a commit to an existing git repository. How can I achieve this?

Upvotes: 5

Views: 384

Answers (1)

VonC
VonC

Reputation: 1323145

Delete the .git of the old repo, and in the new git repo:

cd /path/to/new/git/repo
git add --work-tree=/path/to/old/git/repo add -A .

Upvotes: 2

Related Questions