
If clean.requireForce is set to "true" (the default) in your configuration, one needs to specify -f otherwise nothing will actually happen.Īgain see the git-clean docs for more information. Note the case difference on the X for the two latter commands.
To remove ignored and non-ignored files, run git clean -f -x or git clean -fx.
To remove ignored files, run git clean -f -X or git clean -fX. To remove directories, run git clean -f -d or git clean -fd. Step 1 is to show what will be deleted by using the -n option: # Print out the list of files and directories which will be removed (dry run)Ĭlean Step - beware: this will delete files: # Delete the files from the repository arguments are given, only those paths are affected. This can, for example, be useful to remove all build products. Normally, only files unknown to Git are removed, but if the -x option is specified, ignored files are also removed. Git-clean - Remove untracked files from the working tree Synopsis git clean …Ĭleans the working tree by recursively removing files that are not under version control, starting from the current directory. This is why I'd like to completely start over Also, they went back to unversioned every time I built my project. Others, which I added to the project after the initial commit, showed up as unversioned, I added them and tried to commit and push, but couldn't. I was also wondering if it is normal to have several directories showing in this view? At times I've had and some directory, and at the moment I have my project directory and as Unregistered root "app ( )"…Īt one point I managed to push stuff onto GitHub, but only some of my project files. The directory shows as "Unregistered roots". I've set VCS to 'None' in Settings -> Version Control, but I don't think this removes Git. git folder in my project folder, so where are my git files stored locally and how can I completely start over with Git and GitHub? I'd like to completely remove my project from Git/Git from my project and start fresh.
I'm developing my first project with Android Studio and can't quite get Git and GitHub configured properly.