2

I have solution that looks like this in Visual Studio and I committed them in Git:

--project.a
--project.b

How should I move them (to for example srcFolder) to look like the following without loosing Git history:

--srcFolder
  ---project.a
  ---project.b
SharpC
  • 6,974
  • 4
  • 45
  • 40
srpc
  • 53
  • 5

2 Answers2

1

as mentioned here

CMD and PowerShell does not expand globing characters, use git bash instead

git mv project.a srcFolder

should work then.

sajjad kalantari
  • 723
  • 8
  • 23
1

Apparently "Git will automatically detect the move/rename if your modification is not too severe.".

Note the very important comment to that answer by marczych that if you first stage the changes they will then show up as a move.

(This operation worked fine in Visual Studio 2019.)

SharpC
  • 6,974
  • 4
  • 45
  • 40