7

I'm using git-bash-1.8.4

Git structure: Master -folder1/file1,file2,file3.. -folder2/ -folder3/

so I want to copy file1 to folder2 preserving history.

I tried

git mv file1 folder2 but it doesn't work. please suggest.

Md.Sharieff
  • 141
  • 1
  • 2
  • 12
  • I do not know how, but if I do this with VS IDE (drag drop a file to an other location) its history is preserved so must be a way – g.pickardou Jul 30 '15 at 10:37

1 Answers1

10
git mv file1 folder2

does not work because file1 and folder2 are under different directories. Try following command from the root of repository.

git mv folder1/file1 folder2
Aditya Kadakia
  • 1,209
  • 9
  • 10