Save time, bandwidth and disk usage while cloning a repo by running a partial clone.
It fetches entire commit history but avoids downloading file patches for entire history until checked out.

git clone --filter=blob:none <url>

:github: :gitlab: :gitea:

Take a look at
$ πšπš’πš πš πš˜πš›πš”πšπš›πšŽπšŽ
A less known feature that simplifies workflows esp when making hot fixes, etc.
riptutorial.com/git/example/13

Unstage a single file in
$ git reset HEAD -- <file-path>

Want to find which commit introduced a bug? "Git bisect" is your friend πŸ’‘.
This saved lots of time over the years 😌
( )

stackoverflow.com/a/4714297

Go to the top git directory:
cd $(git rev-parse --show-toplevel)
You may not remember it but can always create an alias.

Weekend is almost upon us. Remember to clean up all your merged branches before you shut your laptops.

$ git checkout main
$ git branch --merged | awk '$1 != "*" {print $NF}' | xargs -n 1 git branch -d

πŸ‘‰ How I generate release notes from commits:
Add a line with keyword like "public: <description>" to merge commits (while merging the PR on ) then you scan "git log" from last release and filter with /#awk/#ack . Easy peasy πŸ˜„
Sample: github.com/adeekshith/watomati

Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!