Does anyone know why stash names are so ugly? I've always found typing "git stash apply stash@{3}" to be pretty painful (not to mention redundant).
Git: how to use stash
11–20 of 43 posts
Re: Git: how to use stash
#12Re: Git: how to use stash
#13Re: Git: how to use stash
#14git commit -a -m 'Work in progress'
Switch to other branch, do work on it. When you come back to the branch,
git reset --soft HEAD^
It's far less volatile than stash, and far better at keeping WIP in the right place when things get so hectic that you have abandoned work on more than one branch.
Stash is only really safe to use for very short-lived uses, such as "stash/pull/unstash"
Re: Git: how to use stash
#15 git stash
git pull --rebase origin master
git stash popRe: Git: how to use stash
#16Far better: git commit -a -m 'Work in progress' Switch to other branch, do work on it. When you come back to the branch, git reset --soft HEAD^ It's far less volatile than stash, and far better at keeping WIP in the right place when things get so hectic that you have abandoned work on more than one branch. Stash is only really safe to use for very short-lived uses, such as "stash/pull/unstash"
Re: Git: how to use stash
#17Does anyone know why stash names are so ugly? I've always found typing "git stash apply stash@{3}" to be pretty painful (not to mention redundant).
Making an alias to use something like `stash apply #3` shouldn't be too complicated
Re: Git: how to use stash
#18> I think it’s worth emphasising that stash stores just your changes and not a snapshot of the entire tree. This means that you can create your stash on one branch and then pop it onto another branch. When you pop from the stash a merge is done including any conflict resolution that may be necessary.
Re: Git: how to use stash
#19The most useful part was the comment: > I think it’s worth emphasising that stash stores just your changes and not a snapshot of the entire tree. This means that you can create your stash on one branch and then pop it onto another branch. When you pop from the stash a merge is done including any conflict resolution that may be necessary.
Re: Git: how to use stash
#20Far better: git commit -a -m 'Work in progress' Switch to other branch, do work on it. When you come back to the branch, git reset --soft HEAD^ It's far less volatile than stash, and far better at keeping WIP in the right place when things get so hectic that you have abandoned work on more than one branch. Stash is only really safe to use for very short-lived uses, such as "stash/pull/unstash"