I am having issues with git
on my local machine. I would like to delete all branches on my machine and start all over again by cloning the project from git.
Note: that I don't want to delete the branches on GitHub.com. Delete locally only.
I am having issues with git
on my local machine. I would like to delete all branches on my machine and start all over again by cloning the project from git.
Note: that I don't want to delete the branches on GitHub.com. Delete locally only.
As long as you're ok with losing all work that you've done locally, you can simply delete the root folder of your project.
Several alternatives:
Save a backup of your local work, and go back to the Github version:
Undo all your local changes, and go back to the last local commit:
git reset --hard HEAD
Reset your local project to the Github version:
Reset local repository branch to be just like remote repository HEAD
git fetch origin
git reset --hard origin/master
git clean -f
It depends on exactly what you're trying to accomplish.