Github - Working with snapshots

This is the continuation of part 2 where I have covered commands to inspect and compare.
Checkout the previous two blog posts here:

In this blog post I will be covering more commands to work with snapshots and the Git staging area.

git status
shows modified files in working directory, staged for your next commit.

git add [file]
adds a file as it looks now to your next commit (stage).

git reset [file]
used to un-stage a file while retaining the changes in working directory.

git diff
diff of what is changed but not staged.

git diff --staged
diff of what is staged but not yet committed.

git commit -m “[descriptive message]”
used to commit your staged content as a new commit snapshot.

My next blog post part 4 will be on isolating work in branches, changing context, and integrating changes.

No comments:

Post a Comment