Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Mercurial/TortoiseHg: Move Files or Directories

📅 2010-Mar-04 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ mercurial, tortoisehg ⬩ 📚 Archive

A move is called a rename in Mercurial. So, to move a tracked file/directory called Foobar into FooDir use:

$ hg rename Foobar FooDir\Foobar

The UI of TortoiseHg does not seem to be as mature as TortoiseSVN right now (v0.9.3). One cannot move a file/directory by keeping the right mouse button pressed while moving the picked items across to the destination directory. To move a file or directory, right-click and choose TortoiseHgRename File.