Hi, Jerry Seutter wrote:

> I'd also like to include stuff about branches, but I haven't gotten my 
> head wrapped around how they work yet.  cg-branch-add expects a location
> after the branch name and I'm not sure what to give it.

Cogito branch creation is based on the idea that you have a different
archive _somewhere_else_ that you pull from, so it wants to store the
source URL in .git/branches/<name>.

Git doesn't have that assumption; "git checkout -b <name>" simply
creates a new branch and switches to it. However, the git branch idea came
somewhat later, so there's a bit of a mismatch at the moment.

Simply switching branches isn't supposed to have any effect unless you
actually have changes in different branches. I tend to work along these


cd /tmp
rm -rf test.$$
mkdir test.$$
cd test.$$
echo not-quite-empty >testfile
cg-add testfile
echo Created test | cg-commit
git checkout -b one
echo foo >>testfile
echo added foo to testfile | cg-commit
git checkout -b two master
echo bar >> testfile
echo added bar to testfile | cg-commit
cg-diff -r one:two | cat
git checkout master
cg-merge one
cg-merge two

The first merge fast-forwards your master tree to "one"; the second 
creates a conflict (lines were added at the same location) which you'll
have to resolve (edit the file).

vi testfile
echo Merged one and two | cg-commit

Matthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  [EMAIL PROTECTED]
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
 - -
Apollo, the God of light, of reason, of proportion, harmony, number --
Apollo blinds those who press too close in worship. Don't look straight
at the sun. Go into a dark bar and have a beer with Dionysos, every now
and then. -- Ursula K. LeGuin

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to