Renaming file issue

时间:2019-04-17 00:11:12

标签: git filenames

I've gotten through step 8, but when I attempt step 9, I get the following message "fatal: not a git repository (or any of the parent directories): .git"

  • What I type in for step 8 has been "git mv sample.txt exampl.txt"

    1. Open the Terminal/Git Bash and (using only the command line) create the following:

    2. Navigate to your Desktop or Directory: cd Desktop

    3. Once there, create a new directory named test: mkdir test

    4. Navigate into the test directory: cd test

    5. Check to see what's inside (it should be empty): ls

    6. Navigate back to Desktop: cd ..

    7. Move the sample.txt file into the test directory: mv sample.txt test

    8. Make sure this was successful: cd test press enter and then ls

    9. Rename the sample.txt file to example.txt

All the solutions I've found on google or githelp all seem to give me the same result.

1 个答案:

答案 0 :(得分:0)

Torek means you forgot to initialize the git repo (after step 2): git init.

Welcome to stackoverflow and have fun with Git.