- First, we'll make a small change to the file and check git status:
$ echo "Another line" >> another-file.txt $ git status On branch master Your branch is up-to-date with 'origin/master'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: another-file.txt no changes added to commit (use "git add" and/or "git commit -a")
This, of course, just tells us that we have modified another-file.txt and we need to use git add to stage it.
- Let's add the another-file.txt file and run git status again:
$ git add another-file.txt $ git status On branch master Your branch is up-to-date with 'origin/master'. Changes ...