I tried by saving a "unified diff", but couldn't find a way to apply it.
And patches work on commited changes, and I don't want commits without proper code reviews.
Ideas appreciated!
It keeps the history clean and avoids all those unreadable merges. Compared to our time with TFS, we have much less merge conflicts now are on Git. The main reason is that Git does a three-way merge because it knows exactly where two branches started to diverge.
Shelving lets you set store a batch of pending changes onto the server and optionally remove them from your local workspace. It comes in really handy for the times when you want to backup your code and store it on the server but don't want to commit it to source control.
git-tfs is a two-way bridge between TFS (Team Foundation Server) and git, similar to git-svn. It fetches TFS commits into a git repository, and lets you push your updates back to TFS. . See the change history for details and download.
In the Commit tool window Alt+0 , right-click the files or the changelist you want to put to a shelf and select Shelve changes from the context menu. In the Shelve Changes dialog, review the list of modified files.
Shelvesets are just temporary branches. So - just make new branch. Branches in Git are very lightweight so creating, pushing and removing from server is very simple and fast. You can name it i.e. wip-blabla
to notify that this is still unready.
git stash is the closest thing to a shelveset I have seen. It is a local pre commit copy that you can fetch into your branch once you start working on it again.
git stash
git checkout somebranch
git checkout branchwithstashedstuff
git stash pop
git stash pop combines a git stash apply and git stash drop against the latest stash.
If you have more then one stash you can do git stash list and git stash apply stash@{n} to get the nth stash.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With