Shall we try to decide on a policy for merging vs rebasing? Personally I prefer simple linear histories. That makes it easy to follow the log, and it simplifies bisecting. Iow, the default would be to use "rebase = true" in tracking branches.
Branches and merges still have their place, but imo they're better suited for more long-lived topic branches.
Yes, I and Grubba discussed this some time ago, and came to the same conclusion. I.e. rebase for everyday commits, but allow merges for long-lived topic branches.
Personally I have
[branch] autosetuprebase = remote
in my ~/.gitconfig, which seems like a good idea.
My favourite command, 'git up': (save as git-up somewhere in your PATH):
#!/bin/sh
no_changes () { git diff-index --quiet --cached HEAD --ignore-submodules -- && git diff-files --quiet --ignore-submodules }
git update-index -q --refresh POP=1 if no_changes ; then POP=0 else echo "Saving local modifications" git stash POP=1 fi
echo "" echo "Updating from remote server" if git pull --rebase "$@" ; then echo "" git log --stat HEAD@{1}..HEAD@{0} echo "" fi
if [ $POP = 1 ] ; then echo "" echo "Restoring stashed local modifications" git stash pop fi
Aha, another one of those odd cvs-isms I've almost forgotten by now. It's better to relearn, I'd say.
Not really, because deleting a file is also a change (unless it was freshly added, of course). It's one of those cases where cvs has fostered broken thinking which one gets used to after a while.
"git checkout -- <file>" does exactly the right thing, because typically one doesn't want to pull in the latest version from the server at the same time. The only thing git doesn't get quite right here imo is that it isn't available from git reset; "git reset --hard -- <file>" would have been more logical.
Typically one _does_ want the latest version. Top two reasons for rm && cvs up:
1. That didn't turn out well, lets scratch it and get latest HEAD 2. Conflict... #¤$#, lets scratch it and get latest HEAD
Well, I like to separate updating and discarding changes, but sure, it's a personal preference. In the second case though, when the mess is the result of an update, one already got the latest version, and then it's much quicker to skip the fetch.
Works so-so with conflicts:
Auto-merged indexer/mysql.url CONFLICT (content): Merge conflict in indexer/mysql.url Failed to merge in the changes. Patch failed at 0001.
When you have resolved this problem run "git rebase --continue". If you would prefer to skip this patch, instead run "git rebase --skip". To restore the original branch and stop rebasing run "git rebase --abort".
Restoring stashed local modifications Cannot restore on top of a dirty state
pike-devel@lists.lysator.liu.se