GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Conversation

Notices

  1. Embed this notice
    Julia Evans (b0rk@social.jvns.ca)'s status on Thursday, 07-Dec-2023 05:06:34 JST Julia Evans Julia Evans

    every git command I use

    In conversation Thursday, 07-Dec-2023 05:06:34 JST from social.jvns.ca permalink

    Attachments


    1. https://cdn.masto.host/socialjvnsca/media_attachments/files/111/535/158/578/346/486/original/ef7a2059acc9cbf9.png
    • Embed this notice
      Ben Ramsey (ramsey@phpc.social)'s status on Thursday, 07-Dec-2023 05:07:44 JST Ben Ramsey Ben Ramsey
      in reply to
      • Felix

      @jamalix @b0rk `git mv` is essentially for renaming a file that’s already in the git repository. It might technically be the same as `git rm old_filename` and `git add new_filename`, but I’m not sure of that.

      In conversation Thursday, 07-Dec-2023 05:07:44 JST permalink
    • Embed this notice
      Felix (jamalix@layer8.space)'s status on Thursday, 07-Dec-2023 05:07:54 JST Felix Felix
      in reply to

      @b0rk Never seen `git mv` before, gonna look it up!
      I like using `git checkout -` to go back to the previous branch.

      In conversation Thursday, 07-Dec-2023 05:07:54 JST permalink
    • Embed this notice
      Ben Ramsey (ramsey@phpc.social)'s status on Thursday, 07-Dec-2023 05:13:53 JST Ben Ramsey Ben Ramsey
      • H
      • Felix

      @u24 @jamalix @b0rk In my experience, it doesn’t always work that way, and sometimes, when I do the rm/add combo, `git status` figures out that I’m actually moving the file and shows it as such, so I’m not sure what’s going on there.

      In conversation Thursday, 07-Dec-2023 05:13:53 JST permalink
    • Embed this notice
      John Marshall (johnm@genomic.social)'s status on Thursday, 07-Dec-2023 06:15:45 JST John Marshall John Marshall
      • Ben Ramsey
      • H
      • Felix

      @u24 @ramsey @jamalix @b0rk This was one of my biggest confusions when I first started with git: it IS the same. Recording the fact of the rename is just an illusion provided by the diff mechanism searching for similar text in differently named blobs. See the diff -M option and friends, and config diff.renames et al.

      In conversation Thursday, 07-Dec-2023 06:15:45 JST permalink
    • Embed this notice
      clacke (clacke@libranet.de)'s status on Thursday, 07-Dec-2023 22:27:02 JST clacke clacke
      in reply to

      @b0rk Yeah in my use most of what I run is aliases so I wouldn't present very useful statistics.

      I'm guessing my most used if you trace the aliases would be fetch, then commit, then rebase. Push is usually inside an interactive rebase and wouldn't be in shell history.

      In conversation Thursday, 07-Dec-2023 22:27:02 JST permalink
    • Embed this notice
      Julia Evans (b0rk@social.jvns.ca)'s status on Thursday, 07-Dec-2023 22:27:03 JST Julia Evans Julia Evans
      in reply to

      here is a highly unscientific graph of the most popular git commands, from the responses to this survey https://forms.gle/ZMmjcDf8fhFnNfaM7

      some commands (checkout, commit, status) are underrepresented because people like to use aliases for them

      50% of people who answered use 22 or more git subcommands, though sampling bias etc etc

      (5/?)

      In conversation Thursday, 07-Dec-2023 22:27:03 JST permalink

      Attachments


      1. https://cdn.masto.host/socialjvnsca/media_attachments/files/111/537/147/189/587/459/original/4a9f46623bab8777.jpeg

    • Embed this notice
      Julia Evans (b0rk@social.jvns.ca)'s status on Thursday, 07-Dec-2023 22:27:04 JST Julia Evans Julia Evans
      in reply to

      ok I made a quick survey about which git commands you use, it's literally 1 question (run `history | grep -Eo '^(git\s+[^ ]*)' | sort | uniq -c | sort -rn` and paste the output)

      if enough people fill it out I will make some highly unscientific graphs

      https://forms.gle/fQjQVxhQrQdu4Cd8A

      (4/?)

      In conversation Thursday, 07-Dec-2023 22:27:04 JST permalink
    • Embed this notice
      Julia Evans (b0rk@social.jvns.ca)'s status on Thursday, 07-Dec-2023 22:27:06 JST Julia Evans Julia Evans
      in reply to

      i'm kind of curious about what people mean when they say "i just use 5 git commands", my best guess is that there are 5 main "stressful" commands (maybe commit, merge, rebase, push, and pull) and that's what folks are thinking of

      (3/?)

      In conversation Thursday, 07-Dec-2023 22:27:06 JST permalink
    • Embed this notice
      Julia Evans (b0rk@social.jvns.ca)'s status on Thursday, 07-Dec-2023 22:27:08 JST Julia Evans Julia Evans
      in reply to

      feels hard to argue that git is easy to learn when i use at a minimum 20 different git subcommands, each of which has its own weird gotchas

      (2/?)

      In conversation Thursday, 07-Dec-2023 22:27:08 JST permalink
    • Embed this notice
      clacke (clacke@libranet.de)'s status on Thursday, 07-Dec-2023 22:27:13 JST clacke clacke
      in reply to

      hmm, looking at the top commands I realize I missed log, diff and blame.

      I will do the stats and unalias my aliases in the results. I'm curious now, maybe I'll surprise myself.

      In conversation Thursday, 07-Dec-2023 22:27:13 JST permalink
    • Embed this notice
      clacke (clacke@libranet.de)'s status on Thursday, 07-Dec-2023 22:27:13 JST clacke clacke
      in reply to
      • Ondřej Surý
      @ondrej @b0rk I have learned within the last year that restore is not just a better named subset of checkout, it can do things checkout can't, so I use it quite a lot in commit surgery these days.
      In conversation Thursday, 07-Dec-2023 22:27:13 JST permalink
    • Embed this notice
      Ondřej Surý (ondrej@mastodon.rfc1925.org)'s status on Thursday, 07-Dec-2023 22:27:14 JST Ondřej Surý Ondřej Surý
      in reply to

      @b0rk Interesting! I’ve never used `git switch` nor `git restore`, but I use `git autosquash` (alias to `git rebase -i --autosquash`) and `git pushf` (alias to `git push --force-with-lease`) almost every day. I also find `git checkout -` very helpful.

      And `git yolo` = `!git commit -m \"$(curl -s https://whatthecommit.com/index.txt)\"` for when “WIP” is not enough as commit message ;).

      In conversation Thursday, 07-Dec-2023 22:27:14 JST permalink

      Attachments


      1. Invalid filename.
    • Embed this notice
      Ondřej Surý (ondrej@mastodon.rfc1925.org)'s status on Thursday, 07-Dec-2023 22:27:18 JST Ondřej Surý Ondřej Surý
      in reply to

      @b0rk Pair it with `git commit --fixup=amend:<ref>` if you want to change the commit message in a previous commit.

      My WIP branches are usually full of normal and amend fixup commits as I improve on things, henceforth autosquash is a lifesaver for me!

      In conversation Thursday, 07-Dec-2023 22:27:18 JST permalink

      Attachments


      clacke likes this.
    • Embed this notice
      Julia Evans (b0rk@social.jvns.ca)'s status on Thursday, 07-Dec-2023 22:27:19 JST Julia Evans Julia Evans
      in reply to
      • Ondřej Surý

      @ondrej TIL autosquash thanks

      In conversation Thursday, 07-Dec-2023 22:27:19 JST permalink
    • Embed this notice
      clacke (clacke@libranet.de)'s status on Thursday, 07-Dec-2023 22:27:21 JST clacke clacke
      in reply to
      • Ondřej Surý
      @ondrej @b0rk I run `git rebase --interactive --autosquash --rebase-merges` many times per day, it's brilliant when you have multiple changes going on.
      In conversation Thursday, 07-Dec-2023 22:27:21 JST permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.