Announcement

Collapse
No announcement yet.

fatal: not under version control

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • fatal: not under version control

    I'm trying to perform the mv command, but even after I define a new folder, I keep getting the same error:
    Code:
    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
    Also, after executing many other commands, they successfully worked, but all gave the same warning:
    Code:
    warning: CRLF will be replaced by LF in Third_html_renamed.
    The file will have its original line endings in your working directory
    Would that have anything to do with the "fatal: not under version control" error?

  • #2
    Git does not version in any way "folders" / "directories". It treats them as part of paths on the way to versioned "files*. Were there any files in the "MoveMe" folder?

    Also, being that you're using Windows, I strongly suggest that you investigate in "line endings". For example, see here: https://help.github.com/en/articles/...h-line-endings

    Comment

    Working...
    X