Skip to content
0
  • Home
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
  • Home
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Sketchy)
  • No Skin
Collapse

Wandering Adventure Party

  1. Home
  2. Uncategorized
  3. I'd be unstoppable if I finally stop postponing learning how to git stash, lmao.

I'd be unstoppable if I finally stop postponing learning how to git stash, lmao.

Scheduled Pinned Locked Moved Uncategorized
3 Posts 2 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • MikaI This user is from outside of this forum
    MikaI This user is from outside of this forum
    Mika
    wrote last edited by
    #1

    I'd be unstoppable if I finally stop postponing learning how to git stash, lmao. What I've been doing for years instead 💀:

    mv <some-pending-file> ..
    git restore .
    git pull
    mv ../<some-pending-file> .

    MikaI 1 Reply Last reply
    0
    • MikaI Mika

      I'd be unstoppable if I finally stop postponing learning how to git stash, lmao. What I've been doing for years instead 💀:

      mv <some-pending-file> ..
      git restore .
      git pull
      mv ../<some-pending-file> .

      MikaI This user is from outside of this forum
      MikaI This user is from outside of this forum
      Mika
      wrote last edited by
      #2

      ok I just watched a quick tutorial on stashing, and it does make me feel silly doing what I've been doing considering how simple it seems to 'stash' xD

      NullN 1 Reply Last reply
      0
      • MikaI Mika

        ok I just watched a quick tutorial on stashing, and it does make me feel silly doing what I've been doing considering how simple it seems to 'stash' xD

        NullN This user is from outside of this forum
        NullN This user is from outside of this forum
        Null
        wrote last edited by
        #3

        @irfan git worktree is another unappreciated command in this space. It recreates your repo on a branch at a different directory. So if I want to keep my changes and still checkout main, I can do

        mkdir -p ../main
        git worktree add ../main main
        cd ../main

        and essentially have both branches checked out at once.

        1 Reply Last reply
        0

        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Login or register to search.
        Powered by NodeBB Contributors
        • First post
          Last post