sdot257
sdot257

Reputation: 10366

Saving Git changes temporarily

Is git-stash what I want to explore? Say I work on my project on my laptop but I need to transfer what I've done so far onto my desktop. Both PCs are sync to a centralized GIT repo. I don't want to commit my changes just yet, I want to pick up where I left off on a different PC.

Upvotes: 3

Views: 1322

Answers (2)

svick
svick

Reputation: 244928

The command git stash is for temporarily saving changes locally (and reverting to previous state). That doesn't seems to be what you want.

If you have direct access from one computer to the other, you can create another remote that points to the other computer. Then push the changes to that computer, without involving the central repository.

Upvotes: 0

Sailesh
Sailesh

Reputation: 26207

git-stash only saves the changes locally. You can not send that change on a different machine afaik.

What you want is to create a new branch, make the required changes, push it to remote, and pull that branch on the machine where you need it.

Upvotes: 10

Related Questions