
- #DELETE STASH GITKRAKEN UPDATE#
- #DELETE STASH GITKRAKEN MANUAL#
- #DELETE STASH GITKRAKEN PATCH#
- #DELETE STASH GITKRAKEN FULL#
That is, to stage some changes, and then stash only those staged changes. I often find it more intuitive to do the inverse of approach.

#DELETE STASH GITKRAKEN UPDATE#
Update () - I've rewritten the script a bit, to better handle the case of conflicts, which should now be presented as unmerged conflicts rather than.
#DELETE STASH GITKRAKEN MANUAL#
If -patch doesn't work, a manual process might:įor one or several files, an intermediate solution would be to:
#DELETE STASH GITKRAKEN FULL#
However that will save the full index (which may not be what you want since it might include other files already indexed), and a partial worktree (which could look like the one you want to stash). The selected changes are then rolled back from your worktree. The stash entry is constructed such that its index state is the same as the index state of your repository, and its worktree contains only the changes you selected interactively. With -patch, you can interactively select hunks from in the diff between HEAD and the working tree to be stashed. Yet, git stash save -patch could allows you to achieve the partial stashing you are after: (Original answer June 2010: manual stash) In order to get to the original state - which is a clear staging area and with only some select un-staged modifications, one could softly reset the index to get (without committing anything like you - bukzor - did). You should " git reset -soft" after such a stash to get your clear staging back: Go see and upvote his answer, which should be the official one (instead of mine).Ībout that option, chhh points out an alternative workflow in the comments:
#DELETE STASH GITKRAKEN PATCH#
This (the stash -patch original solution) is nice, but often I've modified a lot of files so using patch is annoyingīukzor's answer (upvoted, November 2011) suggests a more practical solution, based on The original answer (below, June 2010) was about manually selecting what you want to stash. The test case for this feature shows a few more options off: test_expect_success 'stash with multiple pathspec arguments' '

Simplified example: git stash push path/to/file


See " Stash changes to specific files" for more. When pathspec is given to ' git stash push', the new stash records the modified states only for the files that match the pathspec I need my history to only show the commit where HEAD is currently at, and commits ahead of that to be gone from sight.Since Git 2.13 (Q2 2017), you can stash individual files, with git stash push: git stash push Please help! My OCD is preventing me to ignore it and continue to do work and keep adding commits. I tried to wipe the local repo because thought it was simply a local thing- on Pantheon's DEV environment they are gone after the force push. I can't see them in terminal with git log but I like to use GitKraken to visually see my git history, and there they appear all the time. Fast forward, when I cloned the repo again, I can still see the commits that I thought I had erased from history. Later I did a hard reset to a certain commit and forced pushed to origin. I pushed commits to Pantheon's DEV environment, deployed on both TEST and LIVE environments. I need to get rid of commits that I have already reseted and force pushed to origin they keep coming up whenever I pull or clone the remote repo.
