[video]
[video]
[video]
Here is a very handy GIT feature that I am using more and more. Say you are working in a branch of your project and you don’t want to commit your changes to the current branch you are in, but you don’t want to lose them either. It’s easy to create branches and it’s easy to stash your work for later. You may not be aware that you can push you stashed changes into a new branch.
I pulled this from the great Pro Git
Creating a Branch from a Stash
If you stash some work, leave it there for a while, and continue on the branch from which you stashed the work, you may have a problem reapplying the work. If the apply tries to modify a file that you’ve since modified, you’ll get a merge conflict and will have to try to resolve it. If you want an easier way to test the stashed changes again, you can run git stash branch, which creates a new branch for you, checks out the commit you were on when you stashed your work, reapplies your work there, and then drops the stash if it applies successfully:”
$ git stash branch testchanges Switched to a new branch "testchanges" # On branch testchanges # Changes to be committed: # (use "git reset HEAD..." to unstage) # # modified: index.html # # Changed but not updated: # (use "git add ..." to update what will be committed) # # modified: lib/simplegit.rb # Dropped refs/stash@{0} (f0dfc4d5dc332d1cee34a634182e168c4efc3359)
[video]
[video]
[video]
[video]
[video]
[video]