diff --git a/technology/dev/Git.md b/technology/dev/Git.md index a248a5a..972109b 100644 --- a/technology/dev/Git.md +++ b/technology/dev/Git.md @@ -3,7 +3,7 @@ obj: application wiki: https://en.wikipedia.org/wiki/Git repo: https://github.com/git/git website: https://git-scm.com -rev: 2024-02-06 +rev: 2024-04-15 --- # Git @@ -67,6 +67,14 @@ Git allows commits and tags to be signed using [GnuPG](../cryptography/GPG.md). git config --global commit.gpgSign true` ``` +See how a file come together over commits and authors: +```shell +git blame file + +# Ignore code movements +git blame -C -C -C file +``` + Add files to version control: ```shell git add file @@ -81,6 +89,9 @@ git commit -m "message" # Signed commit git commit -s -m "message" + +# Fix last commit with new changes +git commit --amend ``` See commit changes: @@ -235,6 +246,9 @@ git diff # Output a summary of file creations, renames and mode changes since a given commit: git diff --summary commit +# Output a difference by word instead of line +git diff --word-diff + # Output a statistic of changes git diff --stat commit