- Copy files from source to destination on disk
- Add new files to the solution / project
- Delete old files from the solution / project
- Remove old files from source control
- Add new files to source control
- Replace existing references - files that weren't moved should refer to the right path on disk / in the solution
- Delete old files from disk (if the source control doesn't already do that for you)
- Submit to source control
- Make sure you didn't break the build
- Sleep with a clean conscience the next night
Wednesday, September 15, 2010
Moving files
Moving files is an operation many programmers hesitate to do. It complicates matters when integrating code branches, often the source control program either doesn't handle renaming / moving very well, and even though it's not very "difficult", it is often more trouble than it's worth. In fact the process of moving / renaming files is very mechanical and boring, and the one thing that would help matters is a clear check list of what not to forget. So here's one I made.
Subscribe to:
Post Comments (Atom)
indeed - when using git i don't have to care at all. it also handles merging branches well even with renamed files.
ReplyDeleteso my steps are:
1. git mv old_name new_name
2. edit makefile
3. ???
4. PROFIT
Unfortunately I use Perforce, and the Visual Studio / Perforce integration is pretty poor, when it comes to handling newly added files, deleted files, or moved files - even when you use NiftyPerforce. I realize that the right tools are a big factor here, and a lot of this stuff wouldn't be necessary if the tools were right. For example, previously, renaming classes and references used to be a hassle, but now with VisualAssist + NiftyPerforce that's done seamlessly with one click.
ReplyDelete