When working with a checked-out copy of an SVN or Git project, I often delete or rename files without using the appropriate git mv, svn rename, git rm, or svn delete commands, so these changes are not appropriately reflected when I commit my version back to the repository. Is there a workaround to fix this after the fact, besides being more careful on my end?
When working with a checked-out copy of an SVN or Git project, I often
Share
For Git, have a look at
git add -A. This will add everything which is new or changed, as well as removing files which are not there anymore. It might also add files you don’t really want to add, though, so be careful here.As git does not track renames explicitly, this should be enough (together with a
git commit).For Subversion, you could do something like
svn add --force .followed by asvn committo do the equivalent, but this will not track renames/moves properly. I think it is not trivial to find out which files were renamed (and maybe changed as well) and which were simply added/removed.