Gentoo Archives: gentoo-dev

From: Luca Barbato <lu_zero@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] My masterplan for git migration (+ looking for infra to test it)
Date: Tue, 16 Sep 2014 17:18:06
Message-Id: 541870C3.6080300@gentoo.org
In Reply to: Re: [gentoo-dev] My masterplan for git migration (+ looking for infra to test it) by Patrick Lauer
1 On 15/09/14 01:21, Patrick Lauer wrote:
2 > On Sunday 14 September 2014 15:42:15 hasufell wrote:
3 >> Patrick Lauer:
4 >>>> Are we going to disallow merge commits and ask devs to rebase local
5 >>>> changes in order to keep the history "clean"?
6 >>>
7 >>> Is that going to be sane with our commit frequency?
8 >>
9 >> You have to merge or rebase anyway in case of a push conflict, so the
10 >> only difference is the method and the effect on the history.
11 >>
12 >> Currently... CVS allows you to run repoman on an outdated tree and push
13 >> broken ebuilds with repoman being happy. Git will not allow this.
14 >
15 > iow, git doesn't allow people to work on more than one item at a time?
16
17 It does.
18
19 > That'd mean I need half a dozen checkouts just to emulate cvs, which somehow
20 > doesn't make much sense to me ...
21
22 Your statement sounds strange to me.
23
24 commands you need to know:
25
26 git rebase -i
27
28 git add (-p)
29
30 git commit (-p)
31
32 git branch/checkout
33
34 Examples
35
36 edit cat/pkg/foo.ebuild
37
38 edit cat2/pkg/bar.ebuild
39
40 edit profile
41
42 git add -p # to select by line what you want in the commit
43
44 git commit # and you write down the commit message
45
46 git commit -p # to do both at the same time.
47
48 git commit -p # again to lump other changes line by line
49
50 OR
51
52 edit cat/pkg/foo.ebuild
53
54 git commit -a # everything (that's tracked) you edited gets in a commit
55
56 edit cat/pkg/bar.ebuild
57
58 git commit -a # everything (that's tracked) you edited gets in again
59
60 ...
61
62 git rebase -i # sort out what you want commit merge, edit, drop etc
63
64 git push.
65
66
67
68
69 Git let you do whatever you do in cvs, but in a _much_ saner and faster way.

Replies