SDF Chatter
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Mac@programming.dev to Git@programming.dev ·
edit-2
1 year ago

Every git command I use (Cheatsheet)

programming.dev

message-square
12
fedilink
104

Every git command I use (Cheatsheet)

programming.dev

Mac@programming.dev to Git@programming.dev ·
edit-2
1 year ago
message-square
12
fedilink
every git command I use
programming.dev
external-link

https://wizardzines.com/comics/every-git-command/ Not OC

  • sovietknuckles [they/them]@hexbear.net
    link
    fedilink
    English
    arrow-up
    8
    ·
    1 year ago

    geordi-no git add

    geordi-yes git add -p

    Otherwise, I would be staging the whole file without looking at what I’m staging first

    • GarytheSnail@programming.dev
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      How do you run unit tests for commits if you’re only adding bits of the file?

      • PoolloverNathan@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        You can do git stash -k before running tests.

      • sovietknuckles [they/them]@hexbear.net
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        You’re never actually “adding” the whole file unless it’s a brand-new file, git add my-file just adds every patch change for that file without confirmation.

        Using git add -p my-file, the same hooks will run as if you staged and committed all changes to my-file.

Git@programming.dev

git@programming.dev

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: !git@programming.dev

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Resources

  • Official Git project site
  • Pro Git book

Rules

  1. Follow programming.dev rules
  2. Be excellent to each other, no hostility towards users for any reason
  3. No spam of tools/companies/advertisements. It’s OK to post your own stuff part of the time, but the primary use of the community should not be self-promotion.

Git Logo by Jason Long is licensed under the Creative Commons Attribution 3.0 Unported License.

Visibility: Public
globe

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

  • 1 user / day
  • 4 users / week
  • 8 users / month
  • 423 users / 6 months
  • 32 local subscribers
  • 3.35K subscribers
  • 249 Posts
  • 983 Comments
  • Modlog
  • mods:
  • Ategon@programming.dev
  • Jason Novinger@programming.dev
  • canpolat@programming.dev
  • BE: 0.19.8
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org