[tomboy-list] Tomboy has moved to git. Need new guidelines for contributors! Are you a git expert?

Andreia Gaita shana at jitted.com
Tue Apr 21 17:50:12 PDT 2009


On Wed, Apr 22, 2009 at 1:15 AM, Sandy Armstrong
<sanfordarmstrong at gmail.com> wrote:
> 2) I want to recommend a workflow of one-commit-per-patch, just to
> keep things simple.  Of course, more advanced git users are welcome to
> use the tool however they want.  But I think I'll stick with the
> current GNOME recommendation of:
> * Hack hack hack
> * git commit  # And use a good commit message!
> * git format-patch
>
> Possible alternatives are recommending no committing and a simple `git
> diff` for those used to sending patches but not using version control
> systems, or the other extreme of recommending one-branch-per-patch,
> with as many commits as you like.

git commit is very useful even when working on just one patch - a
possible workflow can be hack commit hack commit hack commit, and when
it's done, git merge --squash or git rebase --interactive, where you
can merge and/or reorder commits. Another possible workflow can be
switching to a clean branch and cherry-pick commits from the working
branch so you can merge and rewrite logs if you need. git cherry-pick
+ git commit --amend repeatedly will basically join up all the
cherry-picked commits in one.

If you don't want to commit, you can use the index area to stage
changes. git-add adds changes to the index, and if you then do other
changes, you can see the unstaged stuff with git diff, and the staged
stuff with git diff --cached. git-add --patch will divide all changes
in a file by chunks, so you can add just the parts you want.

Also, the stashing area is global to the repo, and accumulates, so you
can do git-stash several times, see the stashed things with git stash
list, remove things with git stash apply [ stash@{index} ] or git
stash pop

If you're working on a branch and do changes you don't want to commit
on that branch, you can create and switch branches and the changed
files will move with you to the new branch, so you can hack hack, oops
too many changes here, switch branch, add and commit only the changes
you want to put aside, switch back to working branch, continue
hacking, commit, etc

Hope that helps

> 3) I want to recommend tortoisegit to Windows users, but have not had
> time to do more than document the install.  Anyone have
> experience/recommendations with git on Windows?

While we don't have the awesome perfect managed git implementation
that is going to be worked on in Soc, there's git extensions
(http://code.google.com/p/gitextensions/), git cola
(http://cola.tuxfamily.org/), and the usual command line interfaces
(msys and cygwin). And hey, when we do get our awesome managed git, we
can use it to control and version and diff and log and merge notes on
changes and sync. That would be cute :)

andreia|gaita


More information about the Tomboy-list mailing list