[ditz-talk] [PATCH] added GNU/Readline support
wmorgan-ditz at masanjin.net
Sun Apr 13 21:48:12 EDT 2008
[Sending to ditz-talk because I think others might find this useful too]
Reformatted excerpts from Ramsey Dow's message of 2008-04-13:
> How do I do this? I cloned the ditz master branch on Gitorious, but
> there are no other branches listed. How do I track edge without
> deleting & recloning?
Ok, strap on your seatbelt for a Git crash course.
There are three repos involved: the mainline repo on Gitorious, your
Gitorious clone, and your local repo on disk. What you want (trust me
for now) is to be able to pull down changes from the master and edge
branches of the mainline repo to your local repo, make changes locally,
and then push those changes to a new branch on your Gitorious clone.
Then I'll merge that branch into edge, and you'll see them when you next
pull down changes from edge.
The miracle of distributed SCM is that the above scenario actually
(It's actually even more complicated than that, because I have a local
repo on disk where I'm making all the changes before pushing them to the
Gitorious mainline repo. But forget about that for now!)
So here's what you need to do. First, tell your local repo about the
$ git remote add mainline git://gitorious.org/ditz/mainline.git
Now git knows about a remote repo called mainline. Your repo,
incidentally, is called origin. The next step is to get the remote
$ git remote update
* [new branch] bugs -> mainline/bugs
* [new branch] cyberlync-recurse-dirs -> mainline/cyberlync-recurse-dirs
* [new branch] edge -> mainline/edge
* [new branch] master -> mainline/master
* [new branch] yesmar-readline -> mainline/yesmar-readline
Ok, now you have references to all the current branches in the mainline
repo. Now we'll make local branches to track these ones we're
$ git branch --track mainline-master mainline/master
Branch mainline-master set up to track remote branch refs/remotes/mainline/master.
$ git branch --track mainline-edge mainline/edge
Branch mainline-edge set up to track remote branch refs/remotes/mainline/edge.
At this point the mainline-edge branch on your local machine tracks the
mainline edge branch, so if you git pull while it's checked out, you'll
get the latest and greatest features.
Finally, let's make some changes. We'll make a feature branch against
$ git checkout -b my-awesome-feature mainline-master
Switched to a new branch "my-awesome-feature"
$ ... work work work ...
$ git commit
Ok, time to publish:
$ git publish-branch my-awesome-feature
The last is a little utility I wrote. The actual git commands to do this
are bizarre and obscure. It's here:
And that's "all" there is to it.
Implicit in the above is that your Gitorious clone is not updated in any
way except when you manually update it. It starts with the set of
branches that were available when it was cloned, but that (and the code
itself) quickly gets out of sync. It's a place for you to push your
changes to, and nothing more.
Hope that helps!
William <wmorgan-ditz at masanjin.net>
More information about the ditz-talk