On 17 November 2012 23:47, Jan Lehnardt <[email protected]> wrote: > Nothing too bad, it looks like you merged the master branch into your > docs branch and then pushed that to the asf docs branch. This is > useful for finding merge conflicts and is actually encouraged, if > not with a different technique (rebasing). > > I don’t know how git pull is set up for you locally, but I assume that’s > the culprit here. > > I usually to this: > > # before work starts > git fetch origin > git checkout mybranch > git rebase origin/mybranch # now my local copy is up to the server’s state > # think of this as svn up > # do my work > git push origin mybranch # push to origin branch with name mybranch. > # happytiger > > > git pull / git push are usually set up to sync multiple branches (iirc, the > very latest release of git changes the default on that to just the current > branch, which my rebase & push origin mybranch above, does. > > Hope this helps > Jan > -- > > > On Nov 17, 2012, at 20:58 , Noah Slater <[email protected]> wrote: > >> Hi, >> >> No idea what I just did or why it generated so many commits. Can someone >> help me please? >> >> Here's my bash history for today's hack session, in my docs branch checkout: >> >> 506 git status >> 507 git fetch origin >> 508 git merge origin docs >> 509 git status >> 801 git status >> 802 git add bin/Makefile.am >> 803 git add configure.ac >> 804 git add share/doc/build/Makefile.am >> 805 git add build-aux/sphinx-* >> 806 git status >> 807 git add .gitignore >> 808 git add build-aux/sphinx-* >> 809 git status >> 810 git status >> 811 git status >> 812 git add .gitignore >> 813 git status >> 814 git commit -m 'build system now gracefully handles missing doc >> dependencies' >> 815 git push >> 818 git pull >> 820 git pull >> 821 git pull origin docs >> 822 git status >> 823 git push docs >> 824 git push >> 825 git push origin docs >> >> What went wrong? >> >> Obviously, quite embarrassed by this. But I don't profess to understand >> Git. I really should get around to reading that book some time soon. >> >> Thanks, >> >> -- >> NS >
Hi Noah, I fixed your fix & also hooked in Alex's next batch of updates (YEAH) here: https://github.com/dch/couchdb/tree/docs/ Let me know if the commits match and I'll update things. https://github.com/dch/couchdb/commits/docs I do things a little differently than that on a working branch to try to keep a linear history. Starting from fresh; git checkout -t origin/some-branch then after others have updated it: git pull --ff-only If this fails then I know that I'm ahead of your branch. If I've not pushed my changes *anywhere* else, I can then do git pull --rebase Which will re-insert my changes on top of those pulled down from the origin. You can avoid the rebase stuff by only starting work on a branch after doing `git pull --ff-only` first. That's safer. A+ Dave
