Equivalent Perforce Shelving Command in GitHub
Let’s explore git stash usages, which is equivalent to (not 100%) perforce shelving files concept
In Perforce, you can shelve files. The idea allows you to save your temporary changes (shelve files) and retrieve them later (unshelve files).
I’m a Perforce guy. So, I wonder what is the equivalent shelving files in GitHub? After doing some research, I think the equivalent Perforce shelving files command in GitHub is git stash.
git stash is Similar to Shelving Files
Well, it is not 100% equivalent. The key difference is git stash is purely local, while Perforce shelved files are in the server. Since it is local, you’re the only one who can access the changes. If you want to share with others, you have to create a branch and commit your changes to the remote repository (this will not be covered in this article).
Other than that, I think git stash is pretty much similar to shelving files in Perforce. Let’s explore its usages!
git stash save “<description>”
You can also just use git stash
but it automatically generates the description for you which is often wrong and incorrect. So, I prefer to use git stash
…