![]() Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned. Let us know and again, apologies for the delay. See the Help menu in Desktop to access the logs. If you could share your logs from that day, it would helpful. If this was not the case, I can investigate further as you may be correct in your comment about those parallel issues. If so, once you change the name of the branch back to the original name and the stash should reappear. On, at 18:27, Tiernan L Apologies for the late reply! I hope it is not too late to help you.īy any chance did you rename the branch with the stashes? This will cause your stash to be hidden (not intentional). I do feel the option should be probably disabled in Desktop until it’s working right. It’s way too late to save that commit, but the lesson I learned by losing 3 days work was “Never ever bring uncommitted work to a new branch”. No, i did not rename the branch with the stashes. Hahaha - Hi Tiernan, thanks for replying. new-file-name4 = IGNORED, VANISHED FROM REPOĪgain, I haven’t committed anything, so maybe unstaging the changes to the new branch (via a soft reset) will work, and then i can switch branches and see what’s going on. new-folder4 = IGNORED, VANISHED FROM REPO old-file-name3 = OK, CHANGES DIFFED IN GITHUB DESKTOP ![]() old-file-rename2 = NOTICED, REQUIRES COMMAND LINE ADD old-file-rename1 = IGNORED, VANISHED FROM REPO New branch only has these changes: /old-folder-rename1 = IGNORED, VANISHED FROM REPO Let’s say these are some of the files i worked on, from my working “master” branch: /old-folder1Īnd all the files had uncommitted changes, with some directories and filenames changed: /old-folder-rename1 Losing untracked files would be of course expected, if i were not trying to bring the changes to the new branch. I’m aware that from the point of viee of the upstream master, these were untracked files, but here is an outline of what was lost or updated. It’s 3 days work that seems to have vanished. I don’t actually want these changes going to the new branch because of the missing files/directories - I would like to first commit my uncommitted changes to the previous “master” branch for safekeeping. I would like to switch to my former working “master” branch to find out if changes were stashed, but it seems i am blocked from switching branches until i resolve merge conflicts in the new “feature” branch. Then i noticed the missing directories and hundreds of missing changed/added files Version & OS Tried to commit changes to new branch, but not possible (thankfully!) - merge conflicts reported unresolvable. ![]() New branch was automatically re-based on an upstream master, not my working “master” forked repo.Clicked “Bring my changes to the new branch” not “Stash changes on current branch”.Clicked New Branch in GitHub Desktop, created the “feature” branch.Decided to bring the changes to a new “feature” branch, on my own repo. A confusing thing about branches is how work that you have saved but not committed 'follows' you when you switch branches.Made many uncommitted changes to my own “master” fork of an upstream “master” repo: changed and added many files, changed many directory names.Please show your love and support by sharing this post. Force-delete the temporary branch from local git repository. ![]() ![]() Merge changes from the temporary branch into the destination branch.Navigate/checkout to the "destination branch" where we need the changes.Save a new commit object in the local git repository.Just choose the second option, to bring the changes to the new branch. Create a new temporary branch and apply stashed changes to it All you need to do is switch to the new branch in GitHub Desktop, and it will prompt you to leave your changes on the current branch (which will be stashed), or to bring your changes with you to the new branch.If the branch you wish to apply stashed changes to already exists, you could use a temporary branch to help add the stashed changes to it like so: If you wish to apply stashed changes to a new branch, you can simply create a branch from a stash like so:Īs you can see, you first need to stash changes before you can apply them to a new branch when using git stash branch.Īpply Stashed Changes to an Existing Branch You can quite simply do git stash save on the branch where you have the changes, and then do git stash pop on the branch you want the changes to be in. Save Stashed Changes and Pop Them Into a Different Branch ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |