Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 2

fatal: not under version control

Hello. I'm having trouble getting the mv command to work in git bash. I have two text files, "MoveMe.txt" and "MoveMeX.txt". I want to move the MoveMe.txt from the current directory to the NewFolder01 directory. I also want to move and rename the MoveMeX.txt file to NewFolder01. However, I keep getting the same error:

 

User@DESKTOP-CVJC14D MINGW64 ~/Desktop/SamsGitRepository (master)
$ mkdir NewFolder01
User@DESKTOP-CVJC14D MINGW64 ~/Desktop/SamsGitRepository (master)
$ git mv MoveMe NewFolder01/MoveMe
fatal: not under version control, source=MoveMe, destination=NewFolder01/MoveMe

User@DESKTOP-CVJC14D MINGW64 ~/Desktop/SamsGitRepository (master)
$ git mv MoveMeX NewFolder01/MoveMeRenamed
fatal: not under version control, source=MoveMeX, destination=NewFolder01/MoveMeRenamed

User@DESKTOP-CVJC14D MINGW64 ~/Desktop/SamsGitRepository (master)
$ pwd /c/Users/User/Desktop/SamsGitRepository

User@DESKTOP-CVJC14D MINGW64 ~/Desktop/SamsGitRepository (master)
$ git mv /c/Users/User/Desktop/SamsGitRepository/MoveMe /c/Users/User/Desktop/SamsGitRepository/NewFolder01/MoveMe
fatal: not under version control, source=MoveMe, destination=NewFolder01/MoveMe

 

I also want to mention that I have successfully been getting many other commands to work, but all of them generated this warning:


warning: CRLF will be replaced by LF in Third_html_renamed. The file will have its original line endings in your working directory

 

Just in case that might have something to do with my error?

1 Reply
Commander Lvl 2
Message 2 of 2

Re: fatal: not under version control

Hi  @RedSkeleton007,

 

Welcome to the Github Community Forum!

 

I always hated the windows file manager because it never shows the extension of the files unless you don't specify that you want to see them.

 

Try with this command:

git mv MoveMe.txt NewFolder01/MoveMe.txt

You need to accuse windows for this error because you miss all the extensions.

 

-Gabriele-

 

PS: Linux loves you 🙂

 

Mark helpfull posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great contents!