Git rm several files?

前端 未结 11 1958
长发绾君心
长发绾君心 2020-12-15 05:08

How do I easily remove several files without manually typing the full paths of all of them to git rm? I have plenty of modified files I\'d like to keep so remov

11条回答
  •  抹茶落季
    2020-12-15 05:36

    On Windows 10, using Git Bash, from the .gitignore location in your file structure.

    git rm -r --cached some_directory/
    

    I just used this to ignore a whole directory, recursively. This is what is in my .gitignore file for this:

    # Use .gitignore to ignore a directory and its contents #
    /some_directory/ 
    

提交回复
热议问题