• git is hurting my productivity

    From Anton Antimo@anton@safunu.org to comp.programming on Tue Nov 10 18:26:19 2026
    From Newsgroup: comp.programming

    Pretty much all my life I've been working alone [1]. Working alone it
    matters little whether I commit often or not. It turns out I don't like
    to commit just because I wrote some new function. I don't think git
    should be used as some kind of backup system, although it is. I prefer
    to make commits that contain integral new additions to the software. I
    like a history that's organized. As a result, I sometimes rewrite
    history to fix some of these mistakes I make. I know enough about it to
    really clean things up and rewrite the history---it's okay because I'm
    working alone. But then this week I spend three days cleaning things
    up. That's no good, man. What for? Nobody is watching my repository.
    I'm just wasting my time. I'm even going to collapse this entire
    repository into a single commit very soon out of spite. There's no
    chance I'm ever using any previous version. I should just go back to
    life without version control unless I'm working with somebody else. If
    I ever want a backup, I can just ``cp -pR v1 v2''.

    (*) Footnotes

    [1] When I used git in companies, people just used it as a method for
    uploading code somewhere anyway, so it was mostly useless as a version
    control system.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?B?8J+HtfCfh7FKYWNlayBNYXJjaW4gSmF3b3Jza2nwn4e18J+HsQ==?=@jmj@energokod.gda.pl to comp.programming on Wed Nov 11 02:15:56 2026
    From Newsgroup: comp.programming

    W dniu 10.11.2026 o-a22:26, Anton Antimo pisze:
    But then this week I spend three days cleaning things
    up. That's no good, man. What for? Nobody is watching my repository.

    That is pure nonsense for me. In Git you can easy create "working
    branch" for each of your task. Before merge you can "rebase" with master branch (in the case there were commits or merge in to master in the
    middle time). Quote:

    git checkout feature-branch
    git rebase master

    , source: "Programista" no. 4/2025/119, art. under title "Repozytorium
    Bez Chaosu", page 7.

    Then you can easily "squash" all commits in your "working branch". In
    order to open interactive session, Quote:

    git rebase -i HEAD~4

    , source: ibidem, but page 8.

    Then you can merge your "working branch" as single commit.

    As you can see this require complete 0 (literally "zero") overhead, but require little discipline with branch creation and preparation for merge
    to the master branch.

    NOTE: I DO NOT CHECKED ABOVE IN PRACTISE, BECAUSE FOR NOW I AM
    UNEMPLOYED, BUT I LEARNED IT FROM "PROGRAMISTA" MAGAZINE (IBIDEM).
    --
    Z totaliztycznym salutem!
    Jacek Marcin Jaworski, Pruszcz Gd., woj. Pomorskie, Polska Efc|Efc#, UE Efc-Efc|;
    Pryw. s. WWW: <https://energokod.gda.pl>; Pryw. tel.: +48-609-170-742; Netykieta: <https://energokod.gda.pl/Netykieta.html>.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?B?8J+HtfCfh7FKYWNlayBNYXJjaW4gSmF3b3Jza2nwn4e18J+HsQ==?=@jmj@energokod.gda.pl to comp.programming on Wed Nov 11 02:29:38 2026
    From Newsgroup: comp.programming

    W dniu 11.11.2026 o-a02:15, Efc|Efc#Jacek Marcin JaworskiEfc|Efc# pisze:
    git rebase -i HEAD~4

    This command select last 4 commits and interactively allow you select
    which one of them should be squashed.
    --
    Z totaliztycznym salutem!
    Jacek Marcin Jaworski, Pruszcz Gd., woj. Pomorskie, Polska Efc|Efc#, UE Efc-Efc|;
    Pryw. s. WWW: <https://energokod.gda.pl>; Pryw. tel.: +48-609-170-742; Netykieta: <https://energokod.gda.pl/Netykieta.html>.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.programming on Wed Nov 11 02:13:45 2026
    From Newsgroup: comp.programming

    On Tue, 10 Nov 2026 18:26:19 -0300, Anton Antimo wrote:

    Pretty much all my life I've been working alone [1].

    So do I.

    Working alone it matters little whether I commit often or not.

    I commit when it makes sense, not when it doesnrCOt.

    It turns out I don't like to commit just because I wrote some new
    function.

    Commits should consist of a group of changes that make some kind of
    cohesive sense.

    It is quite common to work on a number of things in a single coding
    session, and then go back and group those changes into multiple
    commits. Sometimes you end up with a commit that might contain a
    version of some file that never actually physically existed in that
    form on disk at any point. That, too, is not unusual.

    I don't think git should be used as some kind of backup system,
    although it is.

    ItrCOs only a rCLbackuprCY in the sense of rCLthis didnrCOt work, I need to go back to something that doesrCY.

    I like a history that's organized. As a result, I sometimes rewrite
    history to fix some of these mistakes I make.

    Nothing surprising, lots of people work that way.

    I know enough about it to really clean things up and rewrite the history---it's okay because I'm working alone.

    Actually, it makes no difference whether you work alone or not. Just
    remember to avoid rebasing already-published branches -- if you want
    to avoid the ire of your co-workers. ;)
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Beej Jorgensen@beej@beej.us to comp.programming on Wed Nov 11 17:38:43 2026
    From Newsgroup: comp.programming

    In article <11d0j0p$2ma7m$1@dont-email.me>,
    Lawrence D Oliveiro <ldo@nz.invalid> wrote:
    It's only a "backup" in the sense of "this didn't work, I need to go
    back to something that does".

    And a clone is another type of "backup".

    And, addressing the OP's point, I think it's a valid backup, as well. If
    one of my laptops explodes or is stolen, I have three other ways to get
    my repo back. I'll lose my working tree, but I commit a lot.
    --
    Brian "Beej Jorgensen" Hall | beej@beej.us
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Beej Jorgensen@beej@beej.us to comp.programming on Wed Nov 11 17:45:58 2026
    From Newsgroup: comp.programming

    In article <87bj7wgyys.fsf@safunu.org>, Anton Antimo <anton@safunu.org> wrote: >Working alone it matters little whether I commit often or not. It
    turns out I don't like to commit just because I wrote some new
    function.

    With respect, it sounds like it *does* matter whether you commit often
    or not, at least to you. :)

    I mostly work solo, too. I have three computers I frequently work on,
    and I use Git to keep them in sync. (Disclaimer: this is for a bunch of markdown documentation, though, not code.) I commit early and often, and
    don't care how clean the graph is. pull.rebase is true everywhere, so
    the history is still linear. But it's full of typo fixes and things like
    that.

    It just doesn't matter--I'm the only one working on it. It's pretty much
    the with my code projects. If I haven't pushed, I'll flatten out stupid
    bug fixes, but if I have pushed, oh well! Releases get tagged.
    --
    Brian "Beej Jorgensen" Hall | beej@beej.us
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Dan Purgert@dan@djph.net to comp.programming on Thu Nov 12 01:14:31 2026
    From Newsgroup: comp.programming

    On 2026-11-11, Lawrence DrCOOliveiro wrote:
    On Tue, 10 Nov 2026 18:26:19 -0300, Anton Antimo wrote:

    Pretty much all my life I've been working alone [1].

    So do I.

    Working alone it matters little whether I commit often or not.

    I commit when it makes sense, not when it doesnrCOt.

    It turns out I don't like to commit just because I wrote some new
    function.

    Commits should consist of a group of changes that make some kind of
    cohesive sense.

    I find it helpful too for "I'm not sure this is going to work" type
    changes, in the sense of "no, that didn't work, go back...".
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.programming on Thu Nov 12 03:44:13 2026
    From Newsgroup: comp.programming

    On Thu, 12 Nov 2026 01:14:31 -0000 (UTC), Dan Purgert wrote:

    On 2026-11-11, Lawrence DrCOOliveiro wrote:

    Commits should consist of a group of changes that make some kind of
    cohesive sense.

    I find it helpful too for "I'm not sure this is going to work" type
    changes, in the sense of "no, that didn't work, go back...".

    Absolutely. The thing with Git is, it gives you the freedom to take
    risks, because you know yourCOve still got the last known good versions
    to fall back to. Create throwaway branches by all means, because you
    can indeed throw them away.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From =?UTF-8?B?8J+HtfCfh7FKYWNlayBNYXJjaW4gSmF3b3Jza2nwn4e18J+HsQ==?=@jmj@energokod.gda.pl to comp.programming on Thu Nov 12 12:18:36 2026
    From Newsgroup: comp.programming

    It seems to be troll-post, because open post author does not answer to
    any our response. It is logical, because git is brilliant tool, and do
    amazing job every day.
    --
    Z totaliztycznym salutem!
    Jacek Marcin Jaworski, Pruszcz Gd., woj. Pomorskie, Polska Efc|Efc#, UE Efc-Efc|;
    Pryw. s. WWW: <https://energokod.gda.pl>; Pryw. tel.: +48-609-170-742; Netykieta: <https://energokod.gda.pl/Netykieta.html>.

    --- Synchronet 3.22a-Linux NewsLink 1.2