I want to remove everything inside my git project. Is there any easy way to do this?
I'm getting "fatal: pathspec '' did not match any files" on Linux/Windows. Do you have any idea?
pocoa
2010-05-21 03:28:09
I saw that my working folder is empty now. So it worked now? What a stupid error message!!My local copy is ok now. But what about the original copy on the server. Do I need to something else?Sorry, I red lots of documents but it's still confusing me.
pocoa
2010-05-21 03:49:21
To empty the remote repo, you need to commit that. `git commit -m "you all, go away"` and then push. `git push`
Damien MATHIEU
2010-05-21 06:20:40
+2
A:
Sure:
rm -rf /path/to/gitrepo
Or did you mean 'Remove all files in the project from content tracking'?
git rm -r /path/to/gitrepo
git commit
MikeyB
2010-05-20 13:33:59
Yeah, I want them to be accessible in the previous version. But the new version shouldn't have them.
pocoa
2010-05-20 13:40:15
+2
A:
If you want to completely remove the repo from GitHub, there is "Delete this repository" option for that on the project admin page. The URL is typically something like:
https://github.com/<username>/<project>/edit
If you want to remove the files from the next revision of the repo, but keep their histories, then you should do something like:
git rm -r .
If you only want to eliminate the history of certain files in the repo, you can use git filter-branch
.
Tim Henigan
2010-05-20 13:38:36
No, I still want to keep those files in previous version. But the new version will not have them.
pocoa
2010-05-20 13:40:52