Reputation: 757
If I do git stash
to store my changes, make some other changes and commit, am I able to do a git stash apply
to merge my previous changes into my latest ones?
I have done a weeks worth of work (still incomplete), but during this time I have been asked to make a small change to another part of the site.
I have made this small change, and want to commit it without committing my weeks worth of work. I know I can use git stash
to temporarily store this work, but will a commit overwrite the stash?
Upvotes: 1
Views: 74
Reputation: 272237
Briefly, yes. git stash
will persist changes across commits.
I would, however, prefer to perform the above workflow by creating a development branch for your feature, and switch to/patch your release branch when quick fixes are required.
Upvotes: 3