|
64 | 64 | switches you between your branches. |
65 | 65 | </p> |
66 | 66 |
|
67 | | - <h4> |
| 67 | + <h4 id="branch-list"> |
68 | 68 | git branch |
69 | 69 | <small>list your available branches</small> |
70 | 70 | </h4> |
|
88 | 88 | that is created, most projects do. |
89 | 89 | </p> |
90 | 90 |
|
91 | | - <h4> |
| 91 | + <h4 id="branch-create"> |
92 | 92 | git branch (branchname) |
93 | 93 | <small>create a new branch</small> |
94 | 94 | </h4> |
|
145 | 145 | README hello.rb more.txt test.txt |
146 | 146 | </pre> |
147 | 147 |
|
148 | | - <h4> |
| 148 | + <h4 id="branch-last-commit"> |
149 | 149 | git branch -v |
150 | 150 | <small>see the last commit on each branch</small> |
151 | 151 | </h4> |
|
160 | 160 | testing 62a557a update test scripts |
161 | 161 | </pre> |
162 | 162 |
|
163 | | - <h4> |
| 163 | + <h4 id="branch-create-switch"> |
164 | 164 | git checkout -b (branchname) |
165 | 165 | <small>create and immediately switch to a branch</small> |
166 | 166 | </h4> |
|
211 | 211 | to switch back to a more stable context your work in progress is easy to put |
212 | 212 | aside and then come back to.</p> |
213 | 213 |
|
214 | | - <h4> |
| 214 | + <h4 id="branch-delete"> |
215 | 215 | git branch -d (branchname) |
216 | 216 | <small>delete a branch</small> |
217 | 217 | </h4> |
|
230 | 230 | * <span class="green">master</span> |
231 | 231 | </pre> |
232 | 232 |
|
233 | | - <h4> |
| 233 | + <h4 id="branch-delete-remote"> |
234 | 234 | git push (remote-name) :(branchname) |
235 | 235 | <small>delete a remote branch</small> |
236 | 236 | </h4> |
|
309 | 309 | <span class="hl">README hello.rb</span> |
310 | 310 | </pre> |
311 | 311 |
|
312 | | - <h4> |
| 312 | + <h4 id="merge-complex"> |
313 | 313 | more complex merges |
314 | 314 | </h4> |
315 | 315 |
|
|
410 | 410 | and the file that had been renamed now has the 'HiWorld' class name change |
411 | 411 | that was done in the other branch. Pretty cool.</p> |
412 | 412 |
|
413 | | - <h4> |
| 413 | + <h4 id="merge-conflicts"> |
414 | 414 | merge conflicts |
415 | 415 | </h4> |
416 | 416 |
|
|
0 commit comments