I work from three different workstations. I would like to leave the workstation in the middle of coding sessions and resume this work later on at another workstation. Given that the code is shared using a remote git repository, I would like to use git to share this work in progress.
In practical terms, work in progress means
- there are modified files
- new files appear without a trace,
- there are deleted files.
In most cases, these changes are temporary: not all changes and most unexplored files will be completed in the final commit. An example of an unused file is a test file duplicated by 20 small changes for testing purposes; I take care of all these files only when I am working on a specific problem, and I do not want to waste time restoring them when switching to another workstation.
I saw other questions and solutions that use the branch to push these changes: while I'm fine with this, there is a problem that these branches will be rewritten each time, requiring git push --force(I don't like --force) or letting them become very dirty over time.
I would like to have a simple git command or alias that allows me to keep the current state of the working directory without "too much noise" with the git history. There should be a simple companion command or git alias that allows me to download these temporary changes from other workstations.
source
share