On 03/10/13 03:55, Carsten Haitzler (The Rasterman) wrote:
> On Wed, 02 Oct 2013 16:20:38 +0100 Tom Hacohen <tom.haco...@samsung.com> said:
>
>> On 02/10/13 16:17, Tom Hacohen wrote:
>>> Hey guys,
>>>
>>> I would like to suggest a new work-flow. This work-flow will not be
>>> mandatory, but just an allowed alternative to the current "commit to
>>> master" approach.
>>>
>>> At the moment we do not allow merges, at all. This was to prevent people
>>> from littering the log with their inability to rebase (git pull
>>> --rebase) their local changes on top of the existing commits. This will
>>> still remain the same. I'd like to suggest using merges to our advantage.
>>>
>>> I suggest the following:
>>> For fixes, small features, and the like, do the same as you do now.
>>> Commit and push to master.
>>>
>>> For bigger features, rewrites, or any form of a few commits that are
>>> tied together by being part of the same set, do as follows (it's
>>> obviously simpler than that, I listed everything to over-simplify things):
>>> 1. Create a branch (either local or remote) for your change.
>>> 2. Work on that branch.
>>> 3. When ready, instead of pushing to master:
>>> 3. rebase over master (git fetch; git rebase origin/master).
>>> 4. switch to master (git checkout master)
>>> 6. git merge --no-ff your-feature-branch-name
>>> 7. Describe your feature in the commit message.
>>> 8. push to master (git push or git push origin master).
>>>
>>> I've done a few example commits on
>>> https://git.enlightenment.org/devs/tasn/git-work-flow-example.git/
>>>
>>> This work-flow lets us have linear history, while having feature-sets
>>> show as a single merge that can easily be reverted, provide a good
>>> description about a feature and the commits that introduced it and I
>>> find generally easier for the eye. There are also technical advantages,
>>> for example, if you run "git log --first-parent" you will only see the
>>> merge commits, cleaning the log from all the fluff involving a feature
>>> letting you just see the feature. Another advantage is that "git bisect"
>>> will not go inside the merged branch unless the issue was introduced there.
>>>
>>> Please feel free to inspect my repo, more specifically, the log:
>>> https://git.enlightenment.org/devs/tasn/git-work-flow-example.git/log/
>>>
>>> To see how it looks.
>>>
>>> Important note: commits on the merge branch should be treated as if they
>>> are on master, that is, don't use this as an excuse to make ugly commits
>>> with bad commit messages.
>>>
>>> Again: I'm not trying to make it mandatory, just to allow this sort of
>>> merges.
>>>
>>> Please let me know what you think.
>>
>> Needless to say, that if agreed upon, I will add some documentation
>> about how best to follow this work-flow.
>
> write some mini tools/scripts. not just docs. if any step in such a workflow
> involves knowing some magic git incantation and/or more than 1 step, then wrap
> it up. eg.
>
> gitfeature-start BRANCHNAME
> gitfeature-merge
>
> the first just creates the branch named BRANCHNAME (with any given namespace
> prepended ) and ensure you switch to it.
>
> the second does all the last steps (rebase over master, blah blah blah) and
> just executes the appropriate sequence of git cmds.
>
>

As Lucas has said, it's pretty straight forward (and only one 
difference) compared to what most of us are used to. The only real 
difference is passing --no-ff instead of --rebase to git merge in my 
process.

Anyhow, this is the process in git commands:

Create a local branch for the feature (something I hope people do already):
"git checkout -b branch-name"

Work on your feature and commit.

rebase over master:
"git fetch ; git rebase origin/master"

Switch to master and merge --no-ff instead of --rebase
"git checkout master ; git merge --no-ff branch-name"

And push:
"git push origin master"

The stages are similar and the same. Also, as I've mentioned, let's let 
people try using it (it's not mandatory) and wait for feedback.

Also, please refer to the really good link Peter has posted to this thread:
https://gist.github.com/jbenet/ee6c9ac48068889b0912

--
Tom.

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to