I want to transfer a work in progress from one machine to another in Git like TFVC Shelveset

143 Views Asked by At

I use VSTS (Visual Studio Team Services) and have some work in TFVC (Team Foundation Version Control) and different work in a Git Repository (repo) as we transition from TFVC to Git.
I frequently (twice a week?) start work on my powerful desk-side machine, but then need to hit the road.
With TFVC, that takes me about 30 seconds... From my desk side I create a shelveset. I then unshelve that shelveset on my Surface Pro... Off I go.

How do I do that with Git?

Most responses I've seen to similar questions involve many, many steps.

2

There are 2 best solutions below

2
On

Create a branch. Commit your changes to your branch. Push the branch to the remote. Merge when you're done.

0
On

@Daniel Mann - Thanks so much for pointing me in the right direction. Using the Visual Studio 2017 UI with your guidance, here's what worked for me:

  1. Create a branch - kztransfer in my case.
  2. I went to Branches and right clicked on master to select "Merge from..." then then selected "Into current branch:" as kztransfer.
  3. I then pushed the branch up to the remote.
  4. On the second machine I went to branches again and under remotes/origin selected kztransfer. I then right clicked and chose "Checkout"
  5. And now I have the code on my other machine. Thanks! Note: I had changes in master first... going forward I would likely have a local branch already and not need to do the merge from master to kztransfer...