Git branches
Khem Raj April 16, 2025 #metaDo you know how expensive is a git branch ?
It is around 50 bytes.
A branch is simply just a pointer to a specific commit. When you create a new branch, Git doesn't copy all the files or the entire history. It simply creates a new pointer that initially points to the same commit your current branch is on.
Imagine a book with many bookmarks. Each bookmark represents a branch, and it points to a specific page (commit). Adding a new bookmark is a very quick and inexpensive operation.
I use git branches to keep work-in-progress activity, in commits add notes to remember the context