user1592380
user1592380

Reputation: 36317

what git command should be used to remove prior git info

I have made a copy ( clone) of a php project and renamed it so that I can use its code as a basis for further development. At this point I've decided not to use git's branch functionality although I understand this may be an option. I'd like to basically perform a new init on this new project's git directory so that there is no memory of the past.

I'm thinking:

git reset --hard HEAD

does this make sense?

Upvotes: 0

Views: 43

Answers (2)

cggaurav
cggaurav

Reputation: 575

git reset --hard HEAD reverts you to the latest commit, discarding current changes. For your purposes you should remove the .git directory from the repo.

Upvotes: 2

Wouter J
Wouter J

Reputation: 41934

You can remove the .git directory in the root of your repo. Git stores everything he knows in there, so removing it will be equal to remove git from this repo. Than you can run git init again to change the directory in a git repository.

Upvotes: 3

Related Questions