With Git, how do I commit a load of deleted files in one go? -
I have a load of deleted files that I want to do.
But I do not want to type GIT RM for each one.
If I type GIT RM
see GIT status below, but not updated Update: ("Add GIT" / RM ... "What will be updating ) (Use "GIT checkout - ..." to discard changes in the work directory)
deleted: ProjectX / ProjectX / Content / Site .css deleted: ProjectX / ProjectX / Controllers / HomeController.cs deleted: ProjectX / ProjectX / Global.asax deleted: ProjectX / ProjectX / Global.asax.cs deleted: ProjectX ProjectX / Models / HomeIndexView.cs deleted: ProjectX / ProjectX / ProjectX.csproj deleted: ProjectX / ProjectX / Properties / AssemblyInfo.cs deleted: ProjectX / ProjectX / Script / MicrosoftAjax.debug.js deleted : ProjectX / ProjectX / Script / MicrosoftAjax.js Deleted: ProjectX / ProjectX / Script / MicrosoftMvcAjax.debug.js Removed: Project X / Project X / Script / Microsoft MvackEx.JS Deleted: Project X / Project X / Script / microsoftmvc deviation.debug.J Deleted Deleted: ProjectX / ProjectX / Scripts / MicrosoftMvcValidation.js Removed: ProjectX / ProjectX / Scripts / jquery-1.3.2-vsdoc.js Removed: ProjectX / ProjectX / Scripts / jquery-1.3.2.js Removed : ProjectX / ProjectX / Script Deleted /jquery-1.3.2.min-vsdoc.js: ProjectX / ProjectX / Script / jQuery-1.3.2.min.js Destroyed: ProjectX / ProjectX / Script / jquery.validate- Vsdoc.js deleted: ProjectX / ProjectX / script / jquery.validate.js deleted: ProjectX / ProjectX / script / jquery.validate.min-vsdoc.js deleted: ProjectX / ProjectX / script / jquery.validate .min.js deleted: ProjectX / ProjectX / view / home / index Espx Removed: ProjectX / ProjectX / Views / Shared / Error.aspx Deleted: ProjectX / ProjectX / Views / Shared / Site.Master Deleted: ProjectX / ProjectX / Views / Web.config Deleted: ProjectX / ProjectX / Web Config
git add -u
< P> Let all steps change with Will Deletion This is usually the simplest way. If it is more suitable then you can limit it to some paths. For example, you use the path of 'unstage' to make any changes that you did not want to reset Name-only --diff-filter = D | Xargs git rm - or you have access to a GNU xargs and need to be copied with the white space in the file name:
Git reset - To make sure that you are just removing the abolition, you have to do something like this:
git diff - dontcommitme.txt
Git diff - Z - name-only -dif-filter = d | Xargs-0 git rm -
Comments
Post a Comment