lemmy.grys.it
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
lemmyreader@lemmy.ml to Linux@lemmy.mlEnglish ·
edit-2
1 year ago

a git cheat sheet - Julia Evans

cdn.masto.host

message-square
12
link
fedilink
261

a git cheat sheet - Julia Evans

cdn.masto.host

lemmyreader@lemmy.ml to Linux@lemmy.mlEnglish ·
edit-2
1 year ago
message-square
12
link
fedilink

cross-posted from: https://lemmy.ml/post/14581344

https://social.jvns.ca/@b0rk/112288027169476498

alert-triangle
You must log in or # to comment.
  • aport@programming.dev
    link
    fedilink
    arrow-up
    20
    arrow-down
    2
    ·
    1 year ago

    Reminder to read the official git book. It’s free and it’s useful. My dudes, stop pretending to understand your tools and actually learn them.

  • saigot@lemmy.ca
    link
    fedilink
    arrow-up
    9
    ·
    1 year ago

    I like this graphic, some of my favourites:

    git log --oneline is super useful for getting just a list of title of commits and nothing else

    git bisect is a little known but extremely useful git archaeology command that automates binary searching for a regression.

    • caseyweederman@lemmy.ca
      link
      fedilink
      arrow-up
      5
      ·
      1 year ago

      I just learned git bisect from https://ohmygit.org/! You run it, then checkout other commits all over the project, and mark them with git bisect good or git bisect bad. Then it paints all commits that led to the good one as good, and all the ones after the bad one as bad, so you just keep narrowing your window by playing checkout Jezzball until there’s only one commit left: the one that introduced the bad state.

  • 𝘋𝘪𝘳𝘬@lemmy.ml
    link
    fedilink
    arrow-up
    10
    arrow-down
    1
    ·
    1 year ago

    tl;dr

    git add .
    git commit -a
    git push
    
    • Benaaasaaas@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      You dropped --force

  • NegativeLookBehind@lemmy.world
    link
    fedilink
    arrow-up
    7
    ·
    1 year ago

    Gits motto should be “fuck around and find out”

    • very_well_lost@lemmy.world
      link
      fedilink
      English
      arrow-up
      7
      ·
      1 year ago

      More like “don’t fuck around but find out anyway”.

      • NegativeLookBehind@lemmy.world
        link
        fedilink
        English
        arrow-up
        7
        ·
        1 year ago

        “Fuck around, have no idea HOW you fucked around, fuck around some more trying to fix it, find out how badly you’ve collectively fucked around”

        • Alex@lemmy.ml
          link
          fedilink
          arrow-up
          3
          ·
          1 year ago

          That’s what the reflog is for!

  • toastal@lemmy.ml
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    Tangent are these VCS Rosetta Stones that might be interesting to some:

    • Darcs/Git/Mercurial: https://darcs.net/RosettaStone

    • Pijul/Git: https://nest.pijul.com/tae/pijul-for-git-users

  • Valmond@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    1 year ago

    I always forget how to do the delete distant branch with the : IIRC.

Linux@lemmy.ml

linux@lemmy.ml

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !linux@lemmy.ml

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

  • !opensource@lemmy.ml
  • !libre_culture@lemmy.ml
  • !technology@lemmy.ml
  • !libre_hardware@lemmy.ml

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 430 users / day
  • 1.06K users / week
  • 2.45K users / month
  • 5.55K users / 6 months
  • 1 local subscriber
  • 57.5K subscribers
  • 4.52K Posts
  • 32.5K Comments
  • Modlog
  • mods:
  • AgreeableLandscape@lemmy.ml
  • nooter692@lemmy.ml
  • MarcellusDrum@lemmy.ml
  • Arthur Besse@lemmy.ml
  • Cyclohexane@lemmy.ml
  • BE: 0.19.12
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org