|
| 1 | ++++ |
| 2 | +title = "Gentoo update workflow" |
| 3 | ++++ |
| 4 | + |
| 5 | +There are two local repositories, `gentoo` and `guru`. |
| 6 | + |
| 7 | +Here's how the remotes are set up for `gentoo`: |
| 8 | + |
| 9 | +1. Running `git remote show` prints |
| 10 | + |
| 11 | + ``` |
| 12 | + origin |
| 13 | + upstream |
| 14 | + ``` |
| 15 | + |
| 16 | +2. Running `git remote show origin` prints |
| 17 | + |
| 18 | + ``` |
| 19 | + * remote origin |
| 20 | + Fetch URL: [email protected]:paveloom-g/personal/gentoo/gentoo.git |
| 21 | + Push URL: [email protected]:paveloom-g/personal/gentoo/gentoo.git |
| 22 | + Push URL: [email protected]:paveloom/gentoo-gentoo.git |
| 23 | + Push URL: ssh://[email protected]/paveloom/gentoo-gentoo.git |
| 24 | + HEAD branch: system |
| 25 | + Remote branches: |
| 26 | + master tracked |
| 27 | + system tracked |
| 28 | + Local branches configured for 'git pull': |
| 29 | + master merges with remote master |
| 30 | + system merges with remote system |
| 31 | + Local refs configured for 'git push': |
| 32 | + master pushes to master (up to date) |
| 33 | + system pushes to system (up to date) |
| 34 | + ``` |
| 35 | + |
| 36 | +3. Running `git remote show upstream` prints |
| 37 | + |
| 38 | + ``` |
| 39 | + * remote upstream |
| 40 | + Fetch URL: [email protected]:gentoo/gentoo.git |
| 41 | + Push URL: [email protected]:gentoo/gentoo.git |
| 42 | + HEAD branch: master |
| 43 | + Remote branch: |
| 44 | + master tracked |
| 45 | + Local ref configured for 'git push': |
| 46 | + master pushes to master (up to date) |
| 47 | + ``` |
| 48 | + |
| 49 | +Here's how the remotes are set up for `guru`: |
| 50 | + |
| 51 | +1. Running `git remote show` prints |
| 52 | + |
| 53 | + ``` |
| 54 | + mirror |
| 55 | + origin |
| 56 | + upstream |
| 57 | + ``` |
| 58 | + |
| 59 | +2. Running `git remote show mirror` prints |
| 60 | + |
| 61 | + ``` |
| 62 | + * remote mirror |
| 63 | + Fetch URL: [email protected]:gentoo/guru.git |
| 64 | + Push URL: [email protected]:gentoo/guru.git |
| 65 | + HEAD branch: master |
| 66 | + Remote branches: |
| 67 | + dev tracked |
| 68 | + master tracked |
| 69 | + Local refs configured for 'git push': |
| 70 | + dev pushes to dev (up to date) |
| 71 | + master pushes to master (up to date) |
| 72 | + ``` |
| 73 | + |
| 74 | +3. Running `git remote show origin` prints |
| 75 | + |
| 76 | + ``` |
| 77 | + * remote origin |
| 78 | + Fetch URL: [email protected]:paveloom-g/personal/gentoo/guru.git |
| 79 | + Push URL: [email protected]:paveloom-g/personal/gentoo/guru.git |
| 80 | + Push URL: [email protected]:paveloom/gentoo-guru.git |
| 81 | + Push URL: ssh://[email protected]/paveloom/gentoo-guru.git |
| 82 | + HEAD branch: system |
| 83 | + Remote branches: |
| 84 | + master tracked |
| 85 | + system tracked |
| 86 | + Local branches configured for 'git pull': |
| 87 | + master merges with remote master |
| 88 | + system merges with remote system |
| 89 | + Local refs configured for 'git push': |
| 90 | + master pushes to master (up to date) |
| 91 | + system pushes to system (up to date) |
| 92 | + ``` |
| 93 | + |
| 94 | +4. Running `git remote show upstream` prints |
| 95 | + |
| 96 | + ``` |
| 97 | + * remote upstream |
| 98 | + Fetch URL: [email protected]:repo/proj/guru.git |
| 99 | + Push URL: [email protected]:repo/proj/guru.git |
| 100 | + HEAD branch: master |
| 101 | + Remote branches: |
| 102 | + dev tracked |
| 103 | + master tracked |
| 104 | + Local branch configured for 'git pull': |
| 105 | + dev merges with remote dev |
| 106 | + Local refs configured for 'git push': |
| 107 | + dev pushes to dev (up to date) |
| 108 | + master pushes to master (up to date) |
| 109 | + ``` |
| 110 | + |
| 111 | +Typical system update procedure: |
| 112 | + |
| 113 | +1. Update the `gentoo` repository: |
| 114 | + |
| 115 | + ```bash |
| 116 | + git checkout master |
| 117 | + git pull upstream master |
| 118 | + git push |
| 119 | + git checkout system |
| 120 | + git rebase master |
| 121 | + git push -f |
| 122 | + ``` |
| 123 | + |
| 124 | +2. Update the `guru` repository: |
| 125 | + |
| 126 | + ```bash |
| 127 | + git checkout master |
| 128 | + git pull upstream master |
| 129 | + git push |
| 130 | + git checkout system |
| 131 | + git rebase master |
| 132 | + git push -f |
| 133 | + ``` |
| 134 | + |
| 135 | +3. Synchronize the system repositories with `emerge --sync`. |
| 136 | + |
| 137 | +4. Update the system with `emerge -uND @world`. |
0 commit comments