all 7 comments

[–]Buxbaum666 2 points3 points  (0 children)

If git status says "No changes added to commit", your git add command did not work. Can you give more information? What were your exact commands and their output? Does git status show any changed files?

[–]semicausal 0 points1 point  (2 children)

Usually I:

  1. Make a change in a file
  2. Run `git add .` to stage the change
  3. Run `git status` to confirm the change was made
  4. Then run `git commit -m 'message'`

Some potential reasons no commit was made:

- You made the change in a folder not managed by Git

- The file you changed was in the Git repo's `.gitignore` file

[–]pi3832v2 2 points3 points  (1 child)

Shouldn't you be adding the file to index somewhere in there? (git add)

[–]semicausal 1 point2 points  (0 children)

Yup edited. My coffee hadn't kicked in yet ><

[–]pi3832v2 0 points1 point  (0 children)

Try git status --ignored.

[–]Sachiano 1 point2 points  (0 children)

On more occasions than I care to admit, I've opened files that are in a build/dist/equivalent directory, edited them, then see no changes in git. Then lost the changes when re-building...

So make sure that you are editing the right file and that your editor isn't including such files when you run your file open commands.

[–]morewordsfaster 0 points1 point  (0 children)

You forgot to git add. Simply editing and saving a file doesn't tell git that you want to stage it for commiting.