SYED SHAH
SYED SHAH

Reputation: 84

I want to move a Git Repository, only one commit.

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

Answers (1)

Vampire
Vampire

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

Related Questions