Civilloquy
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
cm0002@mander.xyz to Programmer Humor@programming.dev · 3 months ago

When you have to checkout the master branch

lemmy.world

message-square
20
fedilink
384

When you have to checkout the master branch

lemmy.world

cm0002@mander.xyz to Programmer Humor@programming.dev · 3 months ago
message-square
20
fedilink
  • Eager Eagle@lemmy.world
    link
    fedilink
    English
    arrow-up
    39
    ·
    3 months ago

    it has always bothered me that checkout is overloaded: it can switch branches or discard pending changes in an unrecoverable way.

    so, PSA, you can replicate the safe part of checkout with git switch and the unsafe with git restore.

    • rhabarba@feddit.org
      link
      fedilink
      arrow-up
      12
      ·
      3 months ago

      Ah, I love coherent software.

      • sik0fewl@lemmy.ca
        link
        fedilink
        arrow-up
        9
        ·
        3 months ago

        Switch and restore came later because checkout was problematic.

      • SleeplessCityLights@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        3 months ago

        Just alias stuff like that, make it coherent.

Programmer Humor@programming.dev

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

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
Visibility: Public
globe

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

  • 1.64K users / day
  • 3.24K users / week
  • 5.57K users / month
  • 13.3K users / 6 months
  • 1 local subscriber
  • 30.3K subscribers
  • 1.84K Posts
  • 47.6K Comments
  • Modlog
  • mods:
  • Feyter@programming.dev
  • adr1an@programming.dev
  • BurningTurtle@programming.dev
  • Pierre-Yves Lapersonne@programming.dev
  • BE: 0.19.5
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org