Actions

EmSys

Git - File Status Lifcycle

From EdWiki

File Status Lifcycle

  • Each file in the working directory can be in one of two states:
  1. Tracked: tracked files are files that were in the last snapshot.They can be unmodified, modified, or staged.
  2. Untracked: untracked files are every thing else - any file(s) in the working directory that weren't in the last snapshot and aren't in the staging area.
  • When we first clone a repository, all of our files will be tracked and unmodified because we just checked them out and haven't edited anything.
  • As we edit files, Git sees them as modified, because we have changed them since our last commit.
  • We stage these modified files and then commit all our staged changes, and the cycle repeats.
Git-file-lifecycle.png