Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 383
Damien Roche Avatar asked Feb 24 '12 07:02

Damien Roche


People also ask

How do I restart git bash?

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.

How do I remove git and start again?

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.


1 Answers

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

rm -rf .git
git init .
like image 176
Marian Theisen Avatar answered Oct 26 '22 00:10

Marian Theisen