user419017
user419017

Reputation:

How to restart git repo?

I've fetched a repo from one of my old projects and I've edited the files so I can use this as a 'skeleton' for new projects. Say I'm here:

/skeleton/framework

I already have the repo there, edited. How would I go about restarting this repo with those files in that directory? What should I have done?

All I did was pull the repo and edit and push to a different named repo (skeleton.git). Trouble is, this repo obviously contains all the history of the repo I pulled from.

Upvotes: 11

Views: 29039

Answers (2)

loving marshmallow
loving marshmallow

Reputation: 331

In my case I had to remove .git and all trace. then copy the app to another location in the hard drive and start all over again (git init . and so on...)

Upvotes: 0

Marian Theisen
Marian Theisen

Reputation: 6354

If you just want to keep your current working tree, and lose all git history etc. you can do

rm -rf .git
git init .

Upvotes: 41

Related Questions