Brian Brian - 1 month ago 17
Git Question

How do you use Git with multiple computers?

I'm trying to use git and I have many computers. I usually work on my desktop, but sometimes use laptops.

How do you sync source code on git when you go home from work and you didn't finish working on the code? Do you send a patch file through email or just commit to git the incomplete codes?

I agree the latter is more convenient, but I think it makes the git changelog dirty.

Answer

Commit your work in progress and push it to a remote branch. When you're ready to merge it into your main branch you can use an interactive rebase to rewrite your history and eliminate "work in progress" commits.