MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/1x144ok/how_big_is_a_git_commit/peu1626/?context=3
r/programming • u/fagnerbrack • Oct 08 '26
46 comments sorted by
View all comments
185
This is why I always just amend my first commit and re-push it with force, saves on disk space.If you’re not using force, are you really using git?
54 u/jaerie Oct 09 '26 I use --force-with-lease. No idea what it does but it feels safer 57 u/whitethunder9 Oct 09 '26 If there are changes that didn’t come from you on remote then force with lease won’t force push over them 9 u/OMG_A_CUPCAKE Oct 09 '26 Add --force-if-includes here. If you (or your IDE) already fetched, --force-with-lease alone won't protect you.
54
I use --force-with-lease. No idea what it does but it feels safer
57 u/whitethunder9 Oct 09 '26 If there are changes that didn’t come from you on remote then force with lease won’t force push over them 9 u/OMG_A_CUPCAKE Oct 09 '26 Add --force-if-includes here. If you (or your IDE) already fetched, --force-with-lease alone won't protect you.
57
If there are changes that didn’t come from you on remote then force with lease won’t force push over them
9 u/OMG_A_CUPCAKE Oct 09 '26 Add --force-if-includes here. If you (or your IDE) already fetched, --force-with-lease alone won't protect you.
9
Add --force-if-includes here. If you (or your IDE) already fetched, --force-with-lease alone won't protect you.
--force-if-includes
--force-with-lease
185
u/nmopqrs_io Oct 08 '26
This is why I always just amend my first commit and re-push it with force, saves on disk space.
If you’re not using force, are you really using git?