Hacker News new | past | comments | ask | show | jobs | submit login

git status scales with the number of files in the repo. Ask HN - Are there any common git operations that scale with the number of commits?



Repository maintenance operations like "git gc" scale with the total number of objects in the repo.


I used to work at a company where our git repository would get so polluted with change-related junk that we had to call (many times literally call) BitBucket and ask them to run git clean up on the remote. Otherwise, fetch/pull and many operations on remote would take forever or often even fail completely due to timeout or lack of RAM.

It's Thursday and you wanna release a hotfix - but nope - all builds are failing because git can't cope with junk and your CI can't proceed. You then have to call BB instead and ask them to clean up, hoping they'll do it within the same day. Ah, exciting times.


git log ;)


I believe git log is limited by the number of lines on the screen...


It may operate in a streaming fashion if it's going to a pager, but naw it'll output however much you want.

Technically it has modes which need to scan all commits in the current branch as well, like the ones that grep for certain changes.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: