Search code examples
gitworkflowgit-commitgit-checkout

Git: Switch workspaces (computers) without committing


Is there a way to apply a diff patch or similar without doing a commit/checkout?


My situation: I often switch between computers when working, and my commit history has a bunch of "switching machines" messages.

My initial guess is that this could lead to other troubles, but thought I might ask in case there is a suitable solution or workflow for this situation.

Edit - clarification: Computers are networked.

Edit - deeper thoughts: Now that I think about it, this would cause some bigger problems with the revision history by not going through Git. But perhaps there is another workflow solution I haven't thought of?


Solution

  • Adding this as a proper answer, so it can be accepted.

    Shared Network Drive

    Since the machines are networked, just put your working copy on a shared network resource. This would remove the need to commit before switching workstations.