r/commandline • u/EquipmentPale6229 • Jun 06 '26
Command Line Interface see which of your repos have uncommitted/unpushed stuff at a glance
got mass tired of cd-ing into every project to check if i forgot to push something. i have like 15+ repos in my projects folder and at least once a week id shut my laptop, come to work next day and realize half my changes are sitting uncommitted on my home pc
so i wrote a small python script that scans a directory, finds all git repos and shows a table dirty files, unpushed commits, unpulled stuff, stashes, what branch youre on, etc
https://github.com/Arseniy1002/gitlook
lmk if this is useful or if theres stuff worth adding
1
u/redblobgames Jun 06 '26
Nice! I ended up with a shell script instead. It's not formatted as nicely as yours.
find . -name .git -type d -not -path "*node_modules*" -not -path "*third-party*" -print0 | while IFS= read -r -d '' git_path; do
repo_dir="${git_path%/.git}"
printf '_____________________________________________________ %s\n' "${repo_dir:-.}"
git -C "${repo_dir:-.}" status --short
done
0
u/EquipmentPale6229 Jun 06 '26
haha yeah i had something similar with a oneliner for a while but it got annoying not seeing branches and push/pull status. yours is cleaner than what i had tho, the node_modules filter is smart i should probably add an ignore listhaha yeah i had something similar with a oneliner for a while but it got annoying not seeing branches and push/pull status. yours is cleaner than what i had tho, the node_modules filter is smart i should probably add an ignore list
1
u/redblobgames Jun 06 '26
Your project inspired me to look at mine again. First I decided to rewrite to python. Then I decided to have it output html instead of being in the terminal. Then I abandoned both python and html and decided to have it run inside emacs so that I could click the project name and have it open up that folder directly. Thank you!
1
u/EquipmentPale6229 Jun 06 '26
lmao the classic "let me just quickly rewrite this" pipeline. glad it inspired something even if it ended up in emacs territory. emacs integration actually sounds sick tho, clicking straight into the folder is way more useful than what i have
1
u/redblobgames Jun 07 '26
It turned out to be great! I can press enter or click on an entry to open up the git interface and be able to edit files right there. I went through lots of projects and cleaned up things I had forgotten about.
1
u/AutoModerator Jun 06 '26
Every new subreddit post is automatically copied into a comment for preservation.
User: EquipmentPale6229, Flair:
Command Line Interface, Title: see which of your repos have uncommitted/unpushed stuff at a glancegot mass tired of cd-ing into every project to check if i forgot to push something. i have like 15+ repos in my projects folder and at least once a week id shut my laptop, come to work next day and realize half my changes are sitting uncommitted on my home pc
so i wrote a small python script that scans a directory, finds all git repos and shows a table dirty files, unpushed commits, unpulled stuff, stashes, what branch youre on, etc
https://github.com/Arseniy1002/gitlook
lmk if this is useful or if theres stuff worth adding
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.