This is my scenario:
Created and uploaded a project on GitHub. Did some commits (ahead of origin/master by n commits). While viewing the repository on GitHub through web browser I found a minor error and can’t control myself from fixing it using GitHub’s very own code editor.
After coming to my local repository, what do I do now? I neither want to lose the changes from GitHub’s editor nor want to loose changes that I had already commited.
(I have single branch on that repository (master) and I am only the developer)
You can do a simple
git pull, but I’d recommend doing agit pull --rebaseas this will avoid having to have an additional merge commit joining the two development histories, thus keeping your history tidy.Here’s a bit of explanation on rebase pulls and how you can enable them by default: http://blog.aplikacja.info/2010/11/git-pull-rebase-by-default/