From 8e64f8f58e4959fa9124f9517684ec70cc94de2e Mon Sep 17 00:00:00 2001 From: Malin Freeborn Date: Wed, 14 May 2025 21:33:16 +0200 Subject: [PATCH] note how to use git with sha256 --- data/git/basics.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/data/git/basics.md b/data/git/basics.md index ca89a5a..e38f2d0 100644 --- a/data/git/basics.md +++ b/data/git/basics.md @@ -16,14 +16,18 @@ git config --global user.name "$YOUR_NAME" # New Git -Start a git in directory `$DIR`: +Decide on algorithm: + +- If you're scared of insecure hash-sums, go with `hash=sha256`. +- If you don't know what a hash sum is, go with `hash=sha1`. + +## Init the Git + +Start a git in directory `${DIR}`: ```bash -mkdir $DIR && cd $DIR -``` - -```bash -git init +git init --object-format=${hash} ${DIR} +cd ${DIR} ``` Make a file explaining what the project does, and tell `git` to track it: