[vtk-developers] [Paraview-developers] New git commit hooks
Mark.Olesen at faurecia.com
Mon Apr 26 10:24:11 EDT 2010
On Mon, 2010-04-26 at 06:54 -0600, David Gobbi wrote:
> I've come across a workflow issue that should be added to the Git wiki
> page. To keep all patches in the correct order, I need to do "git
> pull" before every "git commit". Even though the commits are local,
> if I do them out-of-order with the changes to the origin/master then
> my push is rejected.
I don't think you need a "git pull" before every commit. It should be
sufficient to pull before pushing. The commit resulting from this merge
operation occurs later in the git history and should push without any
issues. I suspect you only hit this if you are trying to push to a
central repository after every local commit (ie, the cvs workflow).
> By reflexively doing a "pull" before every "commit", it looks like I
> can keep a very simple workflow that is almost identical to the old
> cvs workflow.
But is a linear workflow really how we should be working with git?
On other projects, I usually have a personal branch with my adjustments
and periodically merge in the upstream 'origin/master'. This lets you do
many local commits, rework some ideas before finally committing yourself
to publish things. I frequently use commit --amend while working as
means of incrementally working my way through bigger changes.
Here's a little blurb where I make a case for local branches.
... my 2 cents.
This electronic transmission (and any attachments thereto) is intended solely for the use of the addressee(s). It may contain confidential or legally privileged information. If you are not the intended recipient of this message, you must delete it immediately and notify the sender. Any unauthorized use or disclosure of this message is strictly prohibited. Faurecia does not guarantee the integrity of this transmission and shall therefore never be liable if the message is altered or falsified nor for any virus, interception or damage to your system.
More information about the vtk-developers