Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • 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 (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. Off-topic
  3. How Do You Handle Uncommitted Changes? Git Stash

How Do You Handle Uncommitted Changes? Git Stash

Scheduled Pinned Locked Moved Off-topic
5 Posts 4 Posters 1.8k Views 4 Watching
  • 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.
  • R Offline
    R Offline
    Rahul
    wrote on last edited by
    #1

    I am running into a frustrating situation while managing my project, and I don't know how you all handle this.

    So, I am working directly with my VPS server to update some files in a Git repository. I have made several important changes to the code, but I am not quite ready to commit them yet. Before finish, I suddenly have to switch branches to apply an urgent bug fix from a colleague.

    My main issue is :

    • I can not commit to my unfinished work because it is not fully tested.
    • During switching branches, Git is not allowed to proceed due to uncommitted changes.
    • I didn’t want to manually copy my changes and risk losing anything in the process.

    After some research, I found Git stash. It seemed like the right solution, but I was a bit hesitant. If I stashed my changes on the VPS, will they still be there after a system reboot? Would another user accessing the VPS mess up my stash?

    1 Reply Last reply
    0
    • nebulonN nebulon moved this topic from Discuss on
    • BrutalBirdieB Offline
      BrutalBirdieB Offline
      BrutalBirdie
      Partner
      wrote on last edited by
      #2

      I mean, if you are against stashing or not comfortable using it.
      You can always:

      git diff > changes.patch
      

      then store the file somewhere and after all you done just

      git apply changes.patch
      

      But rather learn the tools you are given 🙂 git stash works.

      will they still be there after a system reboot

      Yes git stashed are saved on the disk.

      Like my work? Consider donating a drink. Cheers!

      R 1 Reply Last reply
      0
      • J Offline
        J Offline
        joseph
        Staff
        wrote on last edited by
        #3

        This sounds suspiciously like something written by AI . In fact, reading your last 3 posts, they are all very overly generic

        1 Reply Last reply
        1
        • necrevistonnezrN Online
          necrevistonnezrN Online
          necrevistonnezr
          wrote on last edited by
          #4

          The bot probably only wants to present the link in the first post.

          1 Reply Last reply
          0
          • BrutalBirdieB BrutalBirdie

            I mean, if you are against stashing or not comfortable using it.
            You can always:

            git diff > changes.patch
            

            then store the file somewhere and after all you done just

            git apply changes.patch
            

            But rather learn the tools you are given 🙂 git stash works.

            will they still be there after a system reboot

            Yes git stashed are saved on the disk.

            R Offline
            R Offline
            Rahul
            wrote on last edited by
            #5

            @BrutalBirdie

            Thank you for giving positive response

            1 Reply Last reply
            0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

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


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Bookmarks
            • Search