1. 33
  1.  

  2. 7

    Once I figure out how (and do some more checking), I will try to submit a pull request. I wish I understood git better, but in spite of your help, I still don’t have a proper understanding, so this may take a while.

    If Brian Kernighan feels this way, we can all feel better about headaches with git.

    1. 11

      If Brian Kernighan feels this way, we can all feel better about headaches with git.

      But is he talking about git, or about Github? The term “pull request” as Github uses it confuses me to this day, while I generally don’t have problems with git itself.

      1. 2

        But is he talking about git, or about Github? The term “pull request” as Github uses it confuses me to this day, while I generally don’t have problems with git itself.

        You may be right. The blurred edges between git and GitHub sometimes confuse me too.

        E.g., I only recently realized that if you are in the middle of a pull request on GitHub, and you want to include further changes in the same pull request (e.g., you forgot to update docs and the README), the best thing to do is to use git commit --amend and then force push to the branch on your repo where the pull request originates. If you do that, then GitHub will automatically update the original pull request with the further changes, and everything goes smoothly. On the other hand, if you make the changes as a new commit and then push that to the branch, the new commit is not reflected in the pull request. I suppose this makes sense in one way: the pull request was made starting from a certain commit, and it only runs up to that commit. On the other hand, force pushing in the middle of a pull request initially feels dangerous and potentially destructive.

        1. 11

          if you make the changes as a new commit and then push that to the branch, the new commit is not reflected in the pull request.

          I use both approaches regularly and each leads to my changes being incorporated into the pull request.

          1. 1

            I use both approaches regularly and each leads to my changes being incorporated into the pull request.

            Thanks for the note. I would have sworn the new commit method didn’t work for me recently. But I may have done something else wrong, or maybe I misunderstood what was happening to the PR. In any case, I’ll keep that in mind for next time.

            1. 2

              I have had problems in the past where I thought I was pushing to one remote branch, but actually I was pushing somewhere else. This is a pretty central UX failure of git: the whole concept of remotes and locals is needlessly confused.

              If I were in charge of git, branches would have relative and absolute addresses. local/main would be the absolute address of your local main vs. origin/main. As it is, in git today there’s origin/main, but no way of saying “local/main”. Then there’s the fact that origin/main is only sort of remote. It should just be origin/main is absolutely remote and any time you try to interact with it, git will behind the scenes try to do fetch and only if that fails, use the cache but put up a warning that it couldn’t fetch it. Instead, git will sometimes talk to origin and sometimes not, and you just have to know which commands do or do not cause a fetch. Then the whole concept of branches and upstreams is needlessly baroque. There’s a lot of implicit state in git—when you commit, does the commit update a branch or just make a detached commit? where does it rebase from or push to if you don’t specify?—that has a lot of command specific terminology. It should just be that there’s your current default branch and your current default upstream and then you can change either on an ad hoc basis for any command by doing –branch or –upstream, but instead you just have to memorize how each command works. It’s an awful UX all around.

      2. 1

        Has there ever been an explanation to git’s interface? I feel getting historical context would help in creating the right frame of mind for using it for a lot of people. I know how to use git well but I would still love to read this.

        More on topic, let me try to start a discussion: what’s the most involved awk programs people have come across? I feel the language is heavily under utilized.

        1. 5

          More on topic, let me try to start a discussion: what’s the most involved awk programs people have come across? I feel the language is heavily under utilized.

          Not especially involved, but I always thought that Ward Cunningham’s expense calculator was very clever.

            1. 3

              More on topic, let me try to start a discussion: what’s the most involved awk programs people have come across? I feel the language is heavily under utilized.

              Here’s a 3D game written in gawk.

              1. 1

                More on topic, let me try to start a discussion: what’s the most involved awk programs people have come across? I feel the language is heavily under utilized.

                At my first software engineering job in the digital mapping world we had a data quality check tool written by someone who only new shell/awk. This thing was a 2000k like gawk and ksh mish-mash. It worked and it was quite well structured, but I still feel it would have been a bit easier to maintain in another language. This was in the early 2000s.

            2. 2

              It sounds like the internal representation is just 32 bit unsigned int, which is already done in plan 9 version of the awk.

              9legacy: https://github.com/0intro/plan9-contrib/tree/main/sys/src/cmd/awk

              plan9front: http://git.9front.org/plan9front/plan9front/HEAD/sys/src/cmd/awk/f.html

              1. 2

                I wish I understood git better

                Came here to commiserate but I didn’t think that would be everyone else’s takeaway too!

                1. 2

                  Here’s a recent interview he did, which includes discussion about unix tools and unicode support. https://www.youtube.com/watch?v=GNyQxXw_oMQ