Fwd: fedora-web, live and git

Christos Τrochalakis yatiohi at ideopolis.gr
Tue Feb 12 12:03:46 UTC 2008


Hello there,

I saw the other day ivazquez's blog post[0] and a "make push"[1]
addition by ricky concerning git handling of the fedora-web repo. They
both use rebase before pushing.

Our scenario -correct me if I'm wrong- is that we want to mark as live
a specific commit in the master development history.

            live          master
---a----b----c---d

git-rebase is to "forward-port *local* commits to the updated upstream
head" (git help rebase). Since there are not any local commits to be
rebased in our tree it might make more sense to use git merge instead.

A little example usecase, we want to do some fedora-web development:

git co master
<edit files, coding, etc>
git commit -m 'foo'
<edit files, coding, etc>
git commit -m 'bar'

'bar' commit adds some experimental stuff, we dont want it to be in
our web servers. On the other hand 'foo' is ready to go live. We just
have to merge it into our live branch:

$git co live (go to live branch)
$git merge master~1 (merge master~1 into current branch)

At this point the history looks like this:

                                      live     master
---a----b----c---d----foo-----bar


$git push (push both master and live to the central repo)

$git co master (return to master to continue developing)

ps: "merge" word can be confusing. In our scenario git merge doesn't
produce a merge commit since "live" shares the same devel line with
master (what we do is a fast-forward merge).

[0] http://ivazquez.livejournal.com/5178.html
[1] http://tinyurl.com/3xfwav




More information about the Fedora-infrastructure-list mailing list