I recently switched to Git from Subversion, mainly because I wanted to have a local copy of my repository so that I could compare with history quickly and without a good Internet connection. I’m having to relearn some habits…
Here’s the situation for which I need tips: I work about half the time in my office on an iMac. I work about half the time at home or on the road on a MacBook Pro. I’ve created a private Git repository on GitHub, and cloned it on both machines.
When I move from working at home on a task to working in the office on the same task, I want to easily be able to have the same files in the same state go with me, without having to remember to do a “push”. Does Git accommodate this? Should I get in the habit of automatically pushing after committing?
I ask because right now I’m in the office, and frustrated that I can’t continue with the task I was doing last night at home, because the current state of the files is not represented in GitHub, because I didn’t “push”.
And in general, what Git tips do you have that will work with my two computers that are not co-located?