Read-only archive. These discussions are from Tracston's earlier
technical forum and are kept online because the answers are still useful.
New replies are closed. Need help with something like this?
Talk to us.
Question
23 Oct 2020
Problem
User cloned repository from remote git and now wants to add directories to local git. it will report error that git repo already exists
Solution
Remove all .git directories before adding new git repo information
find . \( -name ".git" -o -name ".gitignore" -o -name ".gitmodules" -o -name ".gitattributes" \) -exec rm -rf -- {} +
Need this fixed properly?
We do this for a living.
Kubernetes, DevOps and platform engineering, delivered in days — not another weekend lost to a stack trace.
Start a project →