-
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?
-
N nebulon moved this topic from Discuss
-
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.
-
The bot probably only wants to present the link in the first post.
-
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.
Thank you for giving positive response