logoalt Hacker News

acedTrex06/24/20258 repliesview on HN

You don't need to know what branch you're on before running commands? I cant tell you the number of times ive been on the wrong branch executing stuff.


Replies

zikduruqe06/24/2025

For me the AWS integration is nice. That way I know what account I'm on, and what region among my dozens of windows.

For example:

    …/.config master on AWS_Prod (use2)
starship.toml:

    [aws]
    format = 'on [($profile )(\($region\) )]($style)'
    style = 'bold #B23D2F'
    symbol = " "  <- cloud symbol
    [aws.region_aliases]
    us-east-1 = 'use1'
    us-east-2 = 'use2'
show 1 reply
kccqzy06/24/2025

I'm highly aware of which branch I'm on. Because it's because I don't use any scripts or automation that switches branches; I only ever switch branches manually so I have that awareness.

show 2 replies
msgodel06/24/2025

I just run git status manually, I always explicitly specify the branch when I do anything that touches a remote, everything else you can undo if you have to.

alganet06/24/2025

I literally use just PS1='$ '.

`git status` to know git stuff. `pwd` for the current working directory, etc

I also don't use aliases like `gs` or `..`

One good thing about having a very minimal setup is that you feel at home anywhere.

It wasn't always like this. I used many, many prompts and shell tools over the decades. The only tool that stood the test of time is tmux.

show 4 replies
setopt06/25/2025

I guess it depends on your day job and workflow?

I’m a researcher and work on small projects with 1-3 people (most of the time it’s just me prototyping stuff alone). I then tend to work on a branch for weeks at a time, so the git branch provides very little information compared to the space it takes in a prompt.

If I was switching branches every 5min, it would be useful.

freeopinion06/24/2025

As a complete aside, and not to argue with you at all: I think it might change your life to take a good look at jj. I just mention this to try to be helpful to you.

jt_b06/24/2025

oh-my-zsh default prompt mode for git branches is for me! super clean. need to familiarize myself with some more of their shorthand commands.

skydhash06/24/2025

Manual git status is enough for me.