STAGE & SNAPSHOT Working with snapshots and the Git staging area Flashcards
Learn git command
1
Q
Show modified files in working directory, staged for your next commit
A
git status
2
Q
Add a file as it looks now to your next commit (stage)
A
git add [file]
3
Q
Un-stage a file while retaining the changes in working directory (undo the commit)
A
git reset [file]
4
Q
diff of what is changed but not staged (compare files with revisions)
A
git diff
5
Q
diff of what is staged but not yet commited
A
git diff –staged
6
Q
commit your staged content as a new commit snapshot
A
git commit -m “[descriptive message]”