Saving Git changes temporarily

前端 未结 2 956
Happy的楠姐
Happy的楠姐 2021-01-20 15:13

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

相关标签:
2条回答
  • 2021-01-20 15:35

    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.

    0 讨论(0)
  • 2021-01-20 15:50

    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.

    0 讨论(0)
提交回复
热议问题