I am working on a project and I have initialized a Git repository in child folder. But I want to move it to the parent folder, so I ran this command:
mv .git ../
But I am getting the below error:
mv : Access to the path 'C:\Users\Ashish
Vispute\OneDrive\Documents\a Real Estate Project\client\.git' is
denied.
At line:1 char:1
+ mv .git ../
+ ~~~~~~~~~~~
+ CategoryInfo : WriteError: (C:\Users\Ashish...ect\cl
ient\.git:DirectoryInfo) [Move-Item], IOException
+ FullyQualifiedErrorId : MoveDirectoryItemIOError,Microsoft.Po
werShell.Commands.MoveItemCommand
What should I do to resolve it, and which command should I run instead?
Try to stop all processes associated with the folder and files (including code editors) and try again.