[Pkg-blender-maintainers] Moving away from CVS?

Cyril Brulebois cyril.brulebois at enst-bretagne.fr
Fri Dec 21 13:41:58 UTC 2007


On 06/12/2007, Florian Ernst wrote:
> The way I see it is, basically you have been the main (I was tempted
> to say 'only') maintainer of blender for quite some time. As such, I'd
> say it's only resonable to make your work as comfortable as possible.

OK, thanks.

> As for me, I felt I really needed to learn git for a while, so I'm
> eager to start. :)

Nice. :)

> > In case you're OK with the idea, since pkg-blender is only
> > maintaining a single package, I'd be tempted not to ask for the
> > creation of a pkg-blender.git directory on git.debian.org, but
> > simply putting it inside the collab-maint directory.  Any DD can
> > commit there, as well as people added to this group (like I have
> > been some months ago).
> > 
> >  1. http://git.debian.org/?p=users/kibi-guest/blender.git;a=summary
> > [...]
> 
> Fine with me.

Will be moved from my ~/public_git to collab-maint by the time you'll
receive this mail, see git-clone below.

> > If you need a crash course, I can provide you with several links, or
> > even summarize basic worflow (à la CVS) in a short mail.
> 
> Yeah, that'd be great, thanks!

OK, here we go for basic commands. I hope it'll be as clear as possible,
don't hesitate to ask questions/report failures/errors.

git-core is the needed tool (almost all git-* commands, which are also
written as git *), gitk is a tcl/tk interface with helps visualizing
what's happening, run it with gitk --all in the directory.

Don't be (too) afraid, see the “A real day” box below, I'm just trying
to make it explicit how to use the commands I'm presenting.

,---[ Cloning, tracking remote changes ]---
| # Introduce yourself to git (will be used in commit messages, etc.
| # (written in ~/.gitconfig; per-repository settings are possible,
| # just omit --global, and see .git/config)
| git-config --global name "Your Self"
| git-config --global email "your at mail"
| 
| # Initial clone
| git-clone ssh://kibi-guest@git.debian.org/git/collab-maint/k3dsurf.git
| 
| # Check the available branches: local only, remote only, all
| # The star points the branch in which you are
| git-branch
| git-branch -r
| git-branch -a
| 
| # Initial, the local branch is set to track origin's HEAD, which in
| # this case points to “unstable”. By default in git it is called
| # “master” but using distribution name as branches is more
| # straightforward when it comes to debian packaging.
| 
| # To fetch changes from origin's branches:
| git-fetch origin
| 
| # Or simply the following, since “origin” is the default “remote”
| git-fetch
| 
| # To check which changes are in origin and not in the local branch
| git-log unstable..origin/unstable
| 
| # Since we're in “unstable”, that can be abbreviated to
| git-log ..origin/unstable
| 
| # Or even, since local unstable tracks remote unstable
| git-log ..origin
| 
| # To merge changes from origin, and check the result
| git-merge . origin/unstable
| git-log
`---

,---[ Committing locally ]---
| # Hack hack hack
| $EDITOR $files
| 
| # Check the changes
| git-diff
| 
| # Cancel any non-committed changes, try:
| git-checkout $file
| git-checkout -f
| git-checkout -f $file
| 
| # Commit all changes, without or with an editor
| git-commit -a -m 'My message'
| git-commit -a
| 
| # Commit specific files only
| git-commit -m 'My message' $file1 $file2
| 
| # I'm pointing you to the user documentation / git tutorials on
| # kernel.org about the index, because it can be a bit tricky, and the
| # above should be sufficient for a start
`---

,---[ Pushing back ]---
| # Check changes that happened since the last sync with origin
| # (all are equivalent in the case of a local unstable branch)
| git-log origin/unstable..unstable
| git-log origin/unstable..
| git-log origin..
| 
| # Pushing (all are equivalent in our “unstable” case)
| git-push origin unstable
| git-push origin
| git-push
| 
| # Listing tags, creating one for the last commit, push it
| git-tag -l
| git-tag version-revision
| git-push origin version-revision
`---

,---[ Playing with branches ]---
| # Create (-b) a new etch-backports branch, starting at origin/unstable,
| # and use it as the current branch (git-checkout)
| git-checkout -b etch-backports origin/unstable
| 
| # Play with git-branch to see what's happening
| 
| # Hack, commit, check with git-log (beware of foo..bar vs bar..foo,
| # which are not symmetric!)
| 
| # Push the changes back
| git-push origin etch-backports
| 
| # Fetch back, check the local branch is now a remote branch also
| git-fetch origin
| git-branch -a
`---

For a day to day work, it can be summarized as:
,---[ A real day ]---
| git-checkout unstable       # Ensure we're in unstable branch
| git-fetch origin            # Fetch
| git-merge . origin/unstable # Merge
| $EDITOR $files              # Hack
| git-log && git-diff         # Check
| git-commit (-a or $files)   # Commit
| git-log origin..            # Check against the remote
| git-push origin             # Push back
`---

I don't have links handy, but the documentation in git-doc is quite
intensive, and the user guide / tutorials on kernel.org are very good.

I tried to keep the above as workflow-oriented as possible, but there
are much more to do with git than what I've just written down.

Cheers,

-- 
Cyril Brulebois
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-blender-maintainers/attachments/20071221/4638a9a1/attachment.pgp 


More information about the Pkg-blender-maintainers mailing list