Skip to content

Instantly share code, notes, and snippets.

@motowilliams
Created June 8, 2012 00:47
Show Gist options
  • Save motowilliams/2892716 to your computer and use it in GitHub Desktop.
Save motowilliams/2892716 to your computer and use it in GitHub Desktop.
mv versus git mv
md RenameTest
cd RenameTest
git init
md FolderV1
echo Test1 > FolderV1\FileV1.txt
echo Test2 > FolderV1\FileV2.txt
git add -A
git commit -m "inital commit"
(git) mv FolderV1\FileV1.txt FolderV1\FileV1a.txt
(git) mv FolderV1\FileV2.txt FolderV1\FileV2a.txt
(git) mv FolderV1 FolderV2
git add -A
git commit -m "renamed files and folder"
git log -p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment