I am fairly new to git and am a bit confused as to how to set up my workflow to work in the most convenient way possible.
I am working on my laptop (running OSX) and our much beefier server (running CentOS) through ssh, where I try and run time consuming tests for my Python code. Doing this for a few months I quickly realised that I was having parallel but separate lines of development since the folder structure is quite different.
I have thus taken the time to set up a github repo and cloned it into my laptop. Then I diffed the python files pairwise (server version vs laptop version) manually merged the differences and pushed the files up to Github. Lastly I cloned the repo on the server. Now I have the same version on all three places which is great.
In the future, I would like to avoid the divergence between the different platforms. Ideally I would like to automatically sync the local repo with Github every time I log in (should in theory be possible to do in .bashrc?), and log out, of the server. Essentially I am trying to avoid the chance that I forget manually syncing between the different machines.
How can I achieve this? Are there any potential pitfalls to this strategy?