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.
Wait, I just figured out: the function start_agent that is created in ~/. bashrc , you can manually call it in Git Bash again. — Alternatively (and probably better), you can open the Task manager and end ssh-agent.exe before re-opening Git Bash.
Just run the rm command with the -f and -r switch to recursively remove the . git folder and all of the files and folders it contains. This Git repo remove command also allows you to delete the Git repo while allowing all of the other files and folder to remain untouched.
If you just want to keep your current working tree, and lose all git history etc. you can do
rm -rf .git
git init .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With