Dit deel is nog niet vertaald. Je ziet de Engelse tekst.
$ als gewone gebruiker# als root (of met sudo)
Put work aside with stash
git stash saves uncommitted changes and gives you a clean working tree — for example to fix something urgent on another branch.
Mark versions with tags
A tag is a fixed name for a commit, usually a version. Annotated tags have a message, an author and a date.
Find the bad commit with bisect
git bisect does a binary search through history: you say "good" or "bad" for each commit Git picks, and it finds the first bad one fast.
See who changed a line
git blame shows the last commit for every line — to find why something was changed, not who to blame.
git blame -L 20,40 modules/network/main.tf
git log -S "0.0.0.0/0" --oneline
git log -L 20,30:modules/network/main.tfgit log -S TEXT finds the commits that added or removed a text — great for "when did this rule appear?".
Work on two branches at once
A worktree is a second working folder for the same repository — no need to stash or clone again.
Search and clean the repository
Find text in tracked files fast, and keep the repository small.