Gašper Štepec
Gašper Štepec

Reputation: 125

Remove .git folder but keep changes

I have git repository inside git repository (don't know how that happened). How do I keep all changes made in the inner repository but delete it as a repository (but keep file structure).

file structure:
web/
--.git folder
-- other folders
-- public/
----angular project folders/
----.git folder

Upvotes: 1

Views: 1128

Answers (1)

ecedenyo
ecedenyo

Reputation: 193

You can delete the inner repository just by deleting that inner .git folder, with this action you will lose all git history / commits done in this inner repository but you will keep all the changes until this point in here, before doing this I will suggest to check if you have any hidden changes you will want to keep (git stash list), I'd understand you don't, but just in case.

Upvotes: 1

Related Questions