Home>

I'm doing git, but I just committed and there is no staging, for example in a directory

wget https://ftp.drupal.org/files/projects/property_zymphonies_theme-2.0.1.tar.gz
tar xzvf property_zymphonies_theme-2.0.1.tar.gz
rm -rf property_zymphonies_theme-2.0.1.tar.gz


I got the file and generated the directory like this.
At this point, if you look at git status,

git status
On branch feature
Untracked files:
  (use "git add<file>..." to include in what will be committed)
        themes/property_zymphonies_theme /
nothing added to commit but untracked files present (use "git add" to track)


It has become. Next, I wanted to undo this operation, so maybe I should delete the directory, but I thought it would be better to do it using git instead, so I did a lot of research.

git commit.
git clean -f
git reset --hard b431e67

I tried to do it, but it didn't work.
I thought it was a little strange, but is this something I should do with the rm command instead of git?

git
  • Answer # 1

    Well, before doing anything, simplyrm -rfI wish I had done it.
    themes/property_zymphonies_theme /Is not yet under the control of git (git addYou haven't done that, right?).

    Orgit clean -fdBut I think it's okay.
    In this case, all files and directories in your working directory that are not under the control of git will disappear.