Reputation: 84
I'm trying to move a git repository to another server, with only a part of the commit history, not all of the history.
Upvotes: 1
Views: 47
Reputation: 38669
Use git checkout --orphan
, to create a new branch without history. Then commit the state that is already added to the index for you and push that branch to the new repository. The result will be exactly what you wanted, a repository with one branch that has one commit.
Upvotes: 2