How to REALLY use git stash (save your work!)
Awaiting inside a loop runs operations sequentially, while collecting tasks and using `Task.WhenAll` enables concurrency when ordering is not required.
Transcript 1 topic
Managing Git stashes
0:00You're working on an issue, but now something's come up. You need to stop and pivot to work on that, but you've got all these changes you're not ready to commit yet. Git Stash is here to help. Git Stash will save your changes and then revert your work working directory to the head commit. And then to get that Stash back, you can just run git Stash pop.
Of course, you can have different sets of Stash changes. And to make sure you're doing the right thing, use git Stash list. That'll list all of your Stash changes with a name and an index. And then you can run git stash pop with the index to make sure you're getting the changes you were looking for. By default, git stash is gonna name that stash w I p for work in progress on branch name, which you can use the m parameter just like you do on commits to provide a message that's more meaningful to you.
One super nice capability of Gitstash is that you can restore it onto any commit. Now if your code base has changed significantly, you can still restore it and apply those changes, but you may have to deal with some merge conflicts if things get really nasty. Until next time.
Sign in to join in. Reading needs nothing.