git commands

add parts of a file

Stack overflow says:

bash git add -p [filenane]

Find differences

Stack overflow says: Diagram explaining the diffs between HEAD, Index and Working tree

HEAD -> Index (staging area):

bash git diff --cached

Index (staging area) -> Working Tree

bash git diff

HEAD -> Working Tree

bash git diff HEAD

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.