so i’m using Git as my source control repo. At work, I do some coding during lunch (work computer) or on the train to/from work (crappy laptop). When I get home, I want to continue that work (home pc).
How do people do this with Git? Commit each time?
Here’s my workflow…
(At work, on work pc)…
- Clone Repo.
- Create / Switch to new Branch
- Tap Tap Fap Fap Pew Pew Code.
- Now it’s time to go home …. ??????? Commit?
So, are people just committing code .. despite it being incomplete, doesn’t compile, etc. etc? and At home / the other computer, doing a PULL and continuing?
Or is there another way to move around your current uncommitted branch code and importing that on the destination-computer?
Make sure you’re working a branch separate from
master, push that, pull when home, work work work. When changes work and must be merged intomaster, be sure to rebase the branch to hide the fact that some commits didn’t actually compile (not just to protect your reputation, but also because reverting to those commits will be senseless).