logoalt Hacker News

Brian_K_Whiteyesterday at 10:04 PM3 repliesview on HN

Commits are not expensive, pushes are. You can do any number of commits before you do one push, unless you are editing online, in which case every act is it's own commit & push.

You can rig up a local ide to pathologically commit+push per save, but you can do literally anything, so what you can do is immaterial.


Replies

orfyesterday at 10:28 PM

Do you have some GitHub architectural knowledge you’d like to share with us?

A push pushes commits and blobs and trees and tags. It’s an interesting metric to track, but the core unit of complexity (and expense) worth tracking on GitHub’s side is obviously the commit.

There’s a difference between pushing 1 commit and 100.

show 1 reply
meeritayesterday at 11:12 PM

Exactly. You can have 3000 commits in a branch, and unless you don't push each of them one by one, shouldn't be a problem the number.

leptonsyesterday at 10:16 PM

>You can rig up a local ide to pathologically commit+push per save

The dev system we use for a 3rd party hosting provider (a big one) requires a commit and push for every file save while we're developing. I created a build system for this that copies the whole repo to a temp folder. As we save changes to files in the main repo folder, the build system watches for changes and copies the changed file to the temp folder, then does a commit on the temp folder and pushes to a an intermediary repo in github which then triggers an action that causes the 3rd party system to update from the intermediary repo. This way we don't pollute our main source repo with a commit every time we save an update to a source file.

It's not my favorite way to develop but it's caused us no real problems except when github goes down.

show 1 reply