frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Git Commands That Cover 90% of a Developer's Daily Workflow

https://jsdev.space/15-git-commands/
29•javatuts•10mo ago

Comments

epmatsw•10mo ago
restore and maybe switch are the two missing ones I think. Rebase for me, but that’s preference. Cherry-pick too.
rentonl•10mo ago
my co-workers used to think I was an expert in git. In reality, they memorized 7 commands while I memorized 15
hbogert•10mo ago
i memorized that a commit tree is a ordered set of patches. Everything goes from there.
Areibman•10mo ago
In similar fashion, this site has saved me countless hours fixing common git issues https://ohshitgit.com
the__alchemist•10mo ago
I need to alias:

  git add .
  git commit -am "descriptive name"
  git push

to:

  git sync "descriptive name"
horsawlarway•10mo ago
personally - skip the 'git add .'

It's a pretty terrible habit to get into, and will (not can - will) cause all sorts of headaches. From minor ones like personal editor configs getting dumped into the projects, all the way up to major ones like secrets ending up in your git history.

If you want something close, but much better, do something like:

    if [[ -n $(git ls-files --others --exclude-standard) ]]; then
        echo "There are untracked files.  Please add, remove, or ignore them."
    else
        git commit -am "descriptive name"
        git push
    fi
the__alchemist•10mo ago
I see your point, but find it worth it for convenience. Ultimately git is a tool I use to get the job done, and I want it out of the way. 99% of the time, I just want to sync my project, which doesn't only mean edits to existing files.
open-paren•10mo ago
How about `git add --patch -all` to make it interactive? I have that aliased to `gap` and it is probably my most used git command.
cholantesh•10mo ago
That sounds better but I like the granularity I get from scrutinizing specific files or the patch takes too long to review.
speff•10mo ago
I'd like to suggest also mentioning `git add -p` (--prompt). It's very helpful for just adding changes relevant to the commit
nickcw•10mo ago
No `git rebase`?

Here are my stats for my last 300 or so git commands from my history

    $ history | grep git | awk '{print $3}' | sort | uniq -c | sort -rn

     71 log
     44 show
     34 diff
     26 co # alias for checkout
     24 cherry-pick
     23 status
     18 brs # alias for branch -v --sort=-committerdate
     13 rebase
     11 commit
     11 add
      8 push
      4 archive
      3 reset
      2 pull
      1 grep
      1 checkout
      1 br
Been doing lots of tricky merges recently hence all the cherry-picks! Not normally such a large part of my workflow.
mercer•10mo ago
For me, I generally don't go far beyond the commands in the article, but I /do/ make a lot of use of git rebase -i in my branches.
karmakaze•10mo ago
Maybe not essential, but reflog is invaluable.

I also like to separate fetch from pull (fetch + merge).

foobarkey•10mo ago
Remove merge and add rebase and we agree :)

Oh and maybe cherry-pick

seba_dos1•10mo ago
Both are essential.
realaleris149•10mo ago
There are other commands?
incomplete•10mo ago
also gonna echo the same sentiment: where's rebase? :)

two other git log commands i find to be insanely useful are:

alias hlog='git log --date-order --graph --date=short --format="%C(green)%h%Creset %C(yellow)%an%Creset %C(blue bold)%ad%Creset %C(red bold)%d%Creset%s"'

and:

alias alog='git log --date-order --all --graph --date=short --format="%C(green)%h%Creset %C(yellow)%an%Creset %C(blue bold)%ad%Creset %C(red bold)%d%Creset%s"'

this is great when working in a repo w/a main "prod" branch that you don't commit to directly, but instead commit to "staging" or "dev". alog shows you the entire repo's history for all branches, and hlog is just the graph of the non-pushable branches (plus all feature branches).

hbogert•10mo ago
i can't take this seriously if there's no mention of the '--amend' option and 'rebase' command
OutOfHere•10mo ago
It missed "git switch" and "git restore".

Flame Wars and Hype Fatigue

https://blog.senko.net/flame-wars-and-hype-fatigue
1•senko•1m ago•0 comments

I'm locking down updates until Nvidia's drivers and Windows gain back my trust

https://www.windowscentral.com/gaming/pc-gaming/nvidia-microsoft-update-trust-pc-gaming
2•colejohnson66•3m ago•0 comments

At 25, Wikipedia faces a double threat: rise of AI and decline of local media

https://www.cbc.ca/radio/sunday/wikipedia-25-year-ai-effect-9.7117795
1•bookofjoe•6m ago•0 comments

Cross-Controller External Component GGreg20_V3 Released for ESPHome

https://iot-devices.com.ua/en/ggreg20_v3-external-component-for-esphome/
1•iotdevicesdev•7m ago•0 comments

High fidelity font synthesis for CJK languages

https://github.com/kaonashi-tyc/zi2zi-JiT
2•kaonashi-tyc-01•8m ago•1 comments

Kubernetes 1.35 silently breaks AL2 EKS nodes that lost patches in November

https://medium.com/@heinancabouly/i-upgraded-to-kubernetes-1-35-and-half-my-eks-nodes-couldnt-res...
1•HeinanCA•8m ago•1 comments

Show HN: Agentic Metric – top for your AI coding agents (token, cost tracking)

https://github.com/MrQianjinsi/agentic-metric
1•MrQianjinsi•8m ago•0 comments

Why Am I Paranoid, You Say?

https://idiallo.com/blog/why-am-i-paranoid
1•jnord•9m ago•0 comments

Show HN: FlowEasy – AI generates production-grade CI/CD pipelines in 3 clicks

https://floweasy.dev
1•michaelmoreira•11m ago•1 comments

Pandas' Public API Is Now Type-Complete

https://pyrefly.org/blog/pandas-type-completeness/
1•ocamoss•13m ago•0 comments

Show HN: Dockportless – No port conflicts running multiple AI agents in parallel

https://github.com/mazrean/dockportless
1•mazrean•13m ago•0 comments

Teenagers are getting far less sleep now than they did in late 2000s, new study

https://medicalxpress.com/news/2026-03-teenagers-late-2000s.html
2•pseudolus•16m ago•0 comments

Show HN: Local memory layer for AI agents, survives restarts, no embeddings

https://screenapp.io/app/v/j4SslxVZ-N
1•JosephjackJR•16m ago•0 comments

Cargo thieves are stealing millions of dollars in tech hardware

https://www.washingtonpost.com/business/2026/03/09/cargo-theft-ai-chips-data-centers/
1•wallflower•16m ago•1 comments

First Look at Firefox Nova

https://www.soeren-hentzschel.at/firefox/exklusiv-so-sieht-das-neue-nova-design-von-firefox-aus/
1•quadrige•18m ago•0 comments

Since 1960, the world has lost languages – and gained thousands

https://asteriskmag.com/issues/13/language-birth
1•pseudolus•18m ago•0 comments

Show HN: Forge, the NoSQL to SQL Compiler

3•brady_bastian•20m ago•0 comments

No leap second will be introduced at the end of June 2026

https://lists.iana.org/hyperkitty/list/tz@iana.org/thread/P6D36VZSZBUSSTSMZKFXKF4T4IXWN23P/
4•speckx•21m ago•0 comments

Show HN: Kairos, real-time AI who cross-verifies (Python, 100KB)

1•joshuaveliyath•23m ago•0 comments

Ageless Linux – Software for Humans of Indeterminate Age

https://agelesslinux.org/
1•speckx•23m ago•0 comments

K-Shaped AI Adoption

https://www.jeremyg.dev/k-shaped-ai-adoption/
1•christophetd•23m ago•0 comments

Show HN: I built a clipboard mgr with crypto address swap attack detection

https://yankput.app
1•revastas•24m ago•0 comments

Azure AI Search vs. Manticore Search

https://manticoresearch.com/blog/azure-ai-search-vs-manticore/
1•snikolaev•24m ago•0 comments

Notes on writing a voxel game in Dyalog APL

https://homewithinnowhere.com/blog/voxel_game/
1•rak1507•28m ago•0 comments

Show HN: Bother – model your project as it exists in reality

https://bother.now/orbit?demo=true
1•kalturnbull•29m ago•0 comments

A CEO's Guide on Data Readiness for AI on Scaling AI Initiatives

https://www.kellton.com/kellton-tech-blog/ceo-guide-data-readiness-ai-scaling-initiatives
2•johandoc•29m ago•1 comments

Show HN: VibeCheck – Know if your vibe code is safe to ship

https://www.vibecheck.expert
2•travistotz•33m ago•1 comments

Bridging the Operational AI Gap

https://www.technologyreview.com/2026/03/04/1133642/bridging-the-operational-ai-gap/
1•joozio•34m ago•0 comments

The Pilgrim Age: On walking, silence, and the age of seeking

https://pilgrima.ge/p/the-pilgrim-age
1•momentmaker•35m ago•0 comments

How Brembo Redesigned F1 Brakes for the 2026 Power Unit Revolution

https://www.thedrive.com/news/how-brembo-redesigned-f1-brakes-for-the-2026-power-unit-revolution
2•breve•38m ago•0 comments