Skip to Content
Navigation:

A stick figure smiling

If you want to see more comics like this, sign up for my saturday comics newsletter or browse more comics!

Image of a comic. To read the full HTML alt text, click "read the transcript".

browse more comics! get the zine!
read the transcript!

the “up to date” in git status is misleading

$ git status   
Your branch is up to date with origin/main

this does NOT mean that you’re up to date with the remote main branch. But why not???

some old version control systems only worked if you were online

Illustration of a sad stick figure with short curly hair.

person (thinking): my internet went out, guess I can’t work

git works offline

Illustration of a smiling stick figure with short straight hair.

git developer (thinking): I want to be able to code on a train with no internet

git developer (thinking): NOTHING in git will use the internet except git pull, git push, and git fetch

this makes git status weird

git developer (thinking): we need to tell people if their branch is up to date… with NO INTERNET??? how?

solution: CACHING

Every remote branch has a local cache named like origin/mybranch (origin is the remote name, mybranch is the branch name)

Git doesn’t call it a cache though, it calls it a “remote tracking branch”

local branch: mybranch

cache: origin/mybranch (only updated on git pull, git push, git fetch)

remote branch: origin mybranch (git push origin mybranch updates this)

(git has no easy way to see when origin/mybranch was last updated)

Saturday Morning Comics!

Want another comic like this in your email every Saturday? Sign up here!

I'll send you one of my favourite comics from my archives every Saturday.
© Julia Evans 2024 | All rights reserved (see the FAQ for notes about licensing)