On Sat, 21 Oct 2006 19:39:41 -0400, Aaron Bentley wrote: > Of course if you have a copy of bzr.dev on your computer, you don't need > to type the full URL. it's just like the 'merge ../b' above. > > But how can you use the branch name of a branch that isn't on your > computer? I suspect git requires a separate 'clone' step to get it onto > your computer first. No. You can merge a branch from a remote repository in a single step: git pull http://example.com/git/repo branch-of-interest But if you want to do something besides (or before) a merge, (for example, just explore its history, do some diffs etc.) then you would fetch it instead, assigning it a local branch name in the process: git fetch http://example.com/git/repo branch-of-interest:local-name After which "local-name" is all one would need to use. So after a fetch like the above, the equivalent of "bzr missing --theirs-only" would be: git log ..local-name [This shows some of the expressive power of git revision specifications. There's no need for a separate "missing" command. It's just one case of viewing a particular subset of the DAG. And the specification language makes almost all interesting subsets easy. The --mine-only specification would be "local-name.."] And beyond what bzr missing does (I believe) it's easy to also see the patch content of each commit with: git log -p ..local-name And then if everything is happy, one could merge that branch in: git pull . local-name (And, yes, it is the case that "pull" with a repository URL of "." is how merging is done. It's bizarre to me that this is not "git merge local-name" instead. There actually _is_ a "git merge" command that could be used here, but it is somewhat awkward to use, (requiring both a commit message (without the -m of git-commit(!)) and an explicit mention of the current branch). So using it would be something like: git merge "merge of local-name" HEAD local-name I've never claimed that git is completely free of its UI warts---though there are fewer now than when I started using it.) But, yes, the notion in git is to bring things in to the current repository and then work with them locally. This has an advantage that network traffic is spent only once if doing multiple operations, (say the three steps shown above: 1) investigate commit messages, 2) investigate patch content, 3) perform the merge). -Carl
Attachment:
pgpAszZhHDb25.pgp
Description: PGP signature