Various fixes for outside-of-Git directory reorganisations 0 ▲ Paul Cochrane 1 hour ago · 23 min read4638 words · Tech · hide Moving files around outside of Git in a Git-managed project will cause Git and humans to get confused. Why don’t my new files show up? Why are some files deleted? What did I do? If that happens, how do you tell Git about the file reorganisation and get things back on track? Prompted by a recent question about this, I thought I’d write up my approach, focusing on command line solutions. Use git mv instead of mv when reorganising files and directories in Git. Consider this: you’re working on a project, and it’s slowly growing. Over time, you have files related to different topics, modules, namespaces, etc. Eventually, you’ll want to reorganise things to group related files together. Thus, you’ll want to put those files into subdirectories. If you manage your project with Git, you should use git mv to move files and directories. But what if you forget and simply move the files around as usual? Git will think that you’ve deleted a whole lot of files, whereas really you’ve moved and/or… Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town