I am currently working in two locations and am encountering problems in terms of keeping my local repos on both machines current. Once I have committed and pushed changes to github on one machine, if I then try to pull the repo to the other local machine I inevitably get errors. I am sure I am doing something wrong, what is the correct procedure for achieving a seamless workflow between the two local machines in relation to my remote repos. This is in relation to both the master and branches I am working on. Thanks!
Share
During development you usually want to rebase your local changes onto the remote HEAD.
Assuming you have no uncommitted changes locally, simply use
git pull --rebase.If you do have uncommitted changes, either commit them or
git stashthem, then rebase and then unstash them usinggit stash pop.