I work on the same project on two different computers, desktop and laptop. Sometimes I need to transition between them while in the middle of some task/feature.
So I want to make a commit on the laptop, and then transport (push/pull) it to the desktop and continue. Then, when the feature is complete I want to make a new commit and then squash it with the half-done commit.
How can I now pull/push it back to the laptop without confusing the history?
What's the proper way of handling this? After doing this, I must also be able to publish the commits. Currently I'm working on the master branch directly, but if working on a separate branch helps I will do that.
I do know how to use git rebase -i, and have used it a few times while still on the same computer without a problem, so your answer does not have to include the details of git rebase/squash.