From 6babcc77e68cfd3e7920a72172e684185f2e427e Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 1 Mar 2026 18:18:28 +0100 Subject: Move git advice to blog website --- blog/content/notes/index.gmi | 1 + blog/content/notes/tech/git-advice.gmi | 21 +++++++++++++++++++++ programming/git/git_advice.md | 22 ---------------------- 3 files changed, 22 insertions(+), 22 deletions(-) create mode 100644 blog/content/notes/tech/git-advice.gmi delete mode 100644 programming/git/git_advice.md diff --git a/blog/content/notes/index.gmi b/blog/content/notes/index.gmi index a75c5b55..a1d71352 100644 --- a/blog/content/notes/index.gmi +++ b/blog/content/notes/index.gmi @@ -25,6 +25,7 @@ Notes about some books I like: => tech/containers-might-not-be-the-right-answer Containers might not be the right answer => tech/crud-is-an-important-unsolved-problem CRUD is an important unsolved problem => tech/about-django About Django +=> tech/git-advice Git advice ### Gadgets diff --git a/blog/content/notes/tech/git-advice.gmi b/blog/content/notes/tech/git-advice.gmi new file mode 100644 index 00000000..8ec41105 --- /dev/null +++ b/blog/content/notes/tech/git-advice.gmi @@ -0,0 +1,21 @@ +# Git advice + +## Never use "git commit -m", use "git commit -v" + +Configure your system so that the EDITOR environment variable refers to your preferred editor. + +With "git commit -v" you can see your commit diff while writing your commit message. This helps you review that your commit is correct and write a better commit message. + +## Use gitignore properly + +=> https://git-scm.com/docs/gitignore gitignore + +Note that by default, Git defaults to $XDG_CONFIG_HOME/git/ignore or $HOME/.config/git/ignore. + +## Use the modern Git commands (or teach them) + +Particularly, "git checkout" has many functionalities that now can be handled by more focused commands like "git switch" and "git reset". + +If you have too much muscle memory and are used to them, then consider learning them only to teach other people so that they start with the safer commands. + +Many Git commands print suggestions that use the newer commands. diff --git a/programming/git/git_advice.md b/programming/git/git_advice.md deleted file mode 100644 index 7dd19818..00000000 --- a/programming/git/git_advice.md +++ /dev/null @@ -1,22 +0,0 @@ -# Git advice - -## Never use `git commit -m`, use `git commit -v` - -Configure your system so that `git commit` opens your preferred editor. - -With `git commit -v` you can see your commit diff while writing your commit message. -This helps you review that your commit is correct and write a better commit message. - -## Use gitignore properly - -See . - -Note that by default, Git defaults to `$XDG_CONFIG_HOME/git/ignore` or `$HOME/.config/git/ignore`. - -## Use the modern Git commands (or teach them) - -Particularly, `git checkout` has many functionalities that now can be handled by more focused commands like `git switch` and `git reset`. - -If you have too much muscle memory and are used to them, then consider learning them only to teach other people so that they start with the safer commands. - -Many Git commands print suggestions that use the newer commands. -- cgit v1.2.3