gitBlock 1.1: Reviewing git Basics
Background: https://unsplash.com/photos/842ofHC6MaI
gitgit itself is a CLI program*: These programs have a different main purpose, but also offer the option of using git via their GUI.
git commandsI hope some of these git commands sound familiar to you.
git statusgit initgit addgit commitgit restoregit stashgit checkoutgit branchgit switchgit mergegit pull / pushgit cherry-pickChanges can be either unstaged, staged or commited.
add the change to the staging area it is stagedcommit all staged changesChanges can be either unstaged, staged or commited.
restore the commited version (and remove any unstaged changes)addendum: git add -iYou can also interactively add changes with -i.
git add -i
# staged unstaged path
# 1: unchanged +4/-0 1.1-git-basics.qmd
# *** Commands ***
# 1: status 2: update 3: revert 4: add untracked
# 5: patch 6: diff 7: quit 8: help
# What now> There’s also an extension available.
git-examplecookbook.md in your git-example directorySince VSCode is primarily a text editor, git functionality is hidden in the sidebar
cookbook.md and restore it.gitgnore.gitignore 📰!
dir/** and !dir/.gitkeepdir/ vs. dir/**
dir/ and !dir/.gitkeep?dir/, the whole directory is ignored and git will not scan it at allAny Questions?