5 ms·
> Ordinary days, I issue git commands several hundred times. I wonder if this is an exaggeration, or if the author truly has that git-heavy of a workload? Ass
by lastofthemojito 6y ago
> Ordinary days, I issue git commands several hundred times.
I wonder if this is an exaggeration, or if the author truly has that git-heavy of a workload?
Assuming you're working an 8-hour day, that's 480 minutes. If you're issuing "several hundred" git commands, I'd take that to mean a minimum of 300. So that's a git command every 96 seconds. When do you have the time to write the actual software in between all of those git commands?!
- freehunter 6y agoCould be some back to back commands: git add . git commit -m “update” git push Although if you’re doing it that often I’d want to set up .bashrc to condense it to a single command.
- acoard 6y agoI decided to explore this a bit. In reality, it's not that the git commands are spaced out equidistantly, it's that you have a flurry of git activity then go back to coding. So, an individual commit can easily hit 5 commands. I always do a `git status` before and after (2), plus maybe a few git adds (2), the commit (1), then potentially a push (1). That's already 6 commands for each commit. In a day I usually do approx 15 commits(±10), as well as re-bases. That's around 90 git commands just for committing. Through in a few rebases, a fetch, and an amend, and you're easily over 100. The quoted OP said "several hundred" commands. Just with commits on a pretty typical workflow, I'm at over a hundred. It doesn't surprise me that someone could double it. I often wear the hat of the "git expert" on a project, and there are some days I'm doing significantly more than just commiting and pushing code too. I have a lot of extra commands I'll run like `git log HEAD..@{u}` which shows the diff in the logs between my current branch and the upstream. And I use `git diff --cached` pretty heavily. Git blame is also invaluable when debugging. These tools don't take a way from actually writing software, they enhance it.