skipnothing/Git

Workflows

Two teams, two printouts of git branch -a: one is a single line, the other a dozen. Same git binary, the same objects underneath, so the difference is a shape each team chose, not a feature git turned on.

  • ▸The same git branch -a on two teams prints lists that share nothing, yet one git built both.
  • ▸The same three commits reach main under every shape; only the branches they cross differ.
  • ▸No shape is the right one; the same feature is cheap for one team and wasteful for another.
BUILDS ON
01

Read the shape off the branches

Clone two teams' repos, run git branch -a in each, and the printouts disagree completely. One team's list is three lines: your * main, then remotes/origin/HEAD -> origin/main and remotes/origin/main. The other runs on through remotes/origin/develop, remotes/origin/release/1.2, two remotes/origin/feature/* lines and a remotes/origin/hotfix/1.2.1. A fresh clone has only one local branch either way; the team's branches arrive as remotes/origin/*. Same command, same git, same kind of objects stored underneath. What differs is how many branches the team keeps alive and how long each one survives before a merge deletes it. Count the branches that never disappear and you have already read the team's model off the screen, no handbook required.

READ THE SHAPE OFF THE BRANCHES

Keep going, sign up to unlock the rest

4 more parts in this topic, plus 18+ more topics in Git.

Sign up, it's freeSee the full Git
Collaboration0/4#18 Git Hooks