Session 2 (9:00a - 9:50a)¶
Files being bumped out of stage (editing a file once it’s staged)? Not really. What really happens? Why is the file shown in unstaged and staged? There are two sets of changes. Two scopes, file and content. Git separates them in to two sets of changes – to see the difference:
git diff --staged
to see what’s going on.
git commit -v
``git add -p``
``git diff -diff-filter=M``
A = Added C = Copied D = Deleted M = Modified R = Renamed T = Type changed U = Unmerged X = Unknown B = Broken pairing
git diff – highlights whitespace changes.
git diff -w – surpresses whitespace changes.
git diff --color-words HEAD
git add -A – adds any new files whereas
git add . will just add modified.