I really appreciated your write up as a primer on git. Thanks for writing it. One issue I have with it, though, is that the part focusing on Pushing and Fast Forward Merges is either vague or incorrect and led me down some confusing paths. I'm specifically referring to the part where you claim "one common problem is when you do development on a branch and the branch changes on the remote repository as well... if you pull master from the remote repository, you will get a warning, and if you force the pull to go through, you will lose commit "
First off, a fetch will never result in a fast forward, since it is just modifying remote references, not merging local references. If you fetch in this scenario, it will not cause an error or you to lose your commit. It just updates the remote reference. You can then merge, resolve any conflicts and you're set. Doing a pull is just doing these two steps as one -- i.e. a pull = fetch + merge. After merging, you can push back.
Thanks for pointing this out--this is either a new feature since I wrote the tutorial, or I didn't get it right the first time around. I think it is correct now.
First off, a fetch will never result in a fast forward, since it is just modifying remote references, not merging local references. If you fetch in this scenario, it will not cause an error or you to lose your commit. It just updates the remote reference. You can then merge, resolve any conflicts and you're set. Doing a pull is just doing these two steps as one -- i.e. a pull = fetch + merge. After merging, you can push back.