1 |
Hi! |
2 |
|
3 |
There is my work flow with git on Science overlay. |
4 |
|
5 |
Create a local copy of science overlay if you have ssh access: |
6 |
>$ git clone git+ssh://git@×××××××××××××××××××.org/proj/sci.git |
7 |
|
8 |
Or if you don't have one: |
9 |
>$ git clone git://git.overlays.gentoo.org/proj/sci.git |
10 |
|
11 |
Or update existing one: |
12 |
>$ git pull origin |
13 |
|
14 |
Create a new branch for work to be committed: |
15 |
>$ git branch $NAME |
16 |
>$ git checkout $NAME |
17 |
... edit ... |
18 |
>$ git add $FILES |
19 |
>$ export ECHANGELOG_USER="Your Name <your.name@g.o>" |
20 |
>$ echangelog |
21 |
>$ ebuild *.ebuild digest |
22 |
>$ repoman -p full |
23 |
>$ git add $FILES |
24 |
>$ git status |
25 |
>$ git commit |
26 |
|
27 |
Try to push changes to overlay and check whether there have been changes |
28 |
to overlay during your work: |
29 |
>$ git push --dry-run -v origin HEAD:master |
30 |
|
31 |
If so update master and rebase your branch: |
32 |
>$ git checkout master |
33 |
>$ git pull origin |
34 |
>$ git checkout $NAME |
35 |
>$ git rebase master |
36 |
|
37 |
Push your changes, update master and delete your temporary branch: |
38 |
>$ git push --dry-run -v origin HEAD:master |
39 |
>$ git push -v origin HEAD:master |
40 |
>$ git checkout master |
41 |
>$ git pull origin |
42 |
>$ git branch -d $NAME |
43 |
|
44 |
Or format a patch and send via mail to developer (using send-mail or as |
45 |
an attachment): |
46 |
>$ git format-patch -1 |
47 |
>$ git send-email --to someone@g.o --suppress-from 0001-yo.patch |
48 |
|
49 |
Git formatted patches can be applied and pushed to overlay: |
50 |
>$ git am 0001-your-package.patch |
51 |
>$ git push --dry-run -v origin HEAD:master |
52 |
>$ git push -v origin HEAD:master |
53 |
>$ git checkout master |
54 |
>$ git pull origin |
55 |
>$ git branch -d NAME |
56 |
|
57 |
Command "gitk" can be used to view your git tree graphically. Other |
58 |
commands which might interest more are: git remote, git rebase. |
59 |
|
60 |
Git "push origin" can be used only when your local copy has been created |
61 |
using git+ssh, otherwise full address has to be used or another named |
62 |
remote has to be created. |
63 |
|
64 |
Hope it might be useful to somebody. |
65 |
|
66 |
|
67 |
Cheers, |
68 |
Reinis |