- Timestamp:
-
03/15/15 06:41:01 (9 years ago)
- Author:
-
Chris Johns
- Comment:
-
Update after rename.
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v14
|
v15
|
|
1 | 1 | = Git Users = |
2 | 2 | |
3 | | |
4 | | |
5 | | [[TOC(Developer/GitUsers, depth=2)]] |
6 | | |
| 3 | [[TOC(Developer/Git/Users, depth=2)]] |
7 | 4 | |
8 | 5 | TODO: Managing a (private/public) git mirror, using github, submitting pull requests... |
| 6 | |
9 | 7 | = Browse the GIT Repository Online = |
10 | | |
11 | 8 | |
12 | 9 | You can browse all available repositories online by accessing http://git.rtems.org/. |
… |
… |
|
71 | 68 | }}} |
72 | 69 | But you shouldn't do any of this on the branch that you cloned, instead you should create a new branch to work with, so that the cloned branch (master) is a pristine copy of the upstream RTEMS repository. |
| 70 | |
73 | 71 | = Working with Branches = |
74 | 72 | |
… |
… |
|
115 | 113 | }}} |
116 | 114 | If you have unmerged changes in the old branch git complains and you need to use -D instead of -d. |
| 115 | |
117 | 116 | = Viewing Changes = |
118 | | |
119 | 117 | |
120 | 118 | To view all changes since the last commit: |
… |
… |
|
224 | 222 | }}} |
225 | 223 | If all goes well the new commits you pulled into your master branch will be merged into your branch1, which will now be up-to-date. However, if branch1 has not been pushed remotely then rebasing might be a good alternative to merging because the merge generates a commit |
| 224 | |
226 | 225 | = Rebasing = |
227 | 226 | |
… |
… |
|
246 | 245 | |
247 | 246 | There is one caveat to using rebase: Do not rebase commits that you have pushed to a public repository. Rebase abandons existing commits and creates new ones that are similar but different. If you push commits that others pull down, and then you rewrite those commits with git rebase and push them up again, the others will have to re-merge their work and trying to integrate their work into yours can become messy. |
| 247 | |
248 | 248 | = Accessing a developer's repository = |
249 | 249 | |
250 | 250 | RTEMS developers with Git commit access have personal repositories on http://git.rtems.org/ that can be [wiki:Git_Committers#Pull_a_Developer's_Repo pulled] to view cutting edge development work shared there. |
| 251 | |
251 | 252 | = Creating a Patch = |
252 | 253 | |
… |
… |
|
264 | 265 | git config --global user.email name@domain.com |
265 | 266 | }}} |
| 267 | |
266 | 268 | = Submitting a Patch = |
267 | 269 | |
… |
… |
|
289 | 291 | git config --global sendemail.smtppass your_password |
290 | 292 | }}} |
| 293 | |
291 | 294 | = Sending Email = |
292 | 295 | |
… |
… |
|
310 | 313 | git send-email /path/to/patch |
311 | 314 | }}} |
| 315 | |
312 | 316 | = Troubleshooting = |
313 | 317 | |
314 | | |
315 | 318 | Some restrictive corporate firewalls block access through the git protocol (git://) If you are unable to reach the server git://git.rtems.org/ you can try accessing through http. To clone the rtems repository using the http protocol use the following command: |
316 | 319 | |
… |
… |
|
320 | 323 | |
321 | 324 | This access through http is slower (way slower!) than through the git protocol therefore the git protocol is preferred. |
| 325 | |
322 | 326 | = Manage Your Code = |
323 | | |
324 | 327 | |
325 | 328 | You may prefer to keep your application and development work in a git repository for all the good reasons that come with version control. For public repositories, you may like to try [https://github.com GitHub] or [https://bitbucket.org/ BitBucket]. RTEMS maintains mirrors on GitHub, which can make synchronizing with upstream changes relatively simple. If you need to keep your work private, you can use one of those services with private repositories or manage your own server. The details of setting up a server are outside the scope of this document, but if you have a server with ssh access you should be able to [http://git-scm.com/book/en/Git-on-the-Server-Setting-Up-the-Server find instructions] on how to set up git access. Once you have git configured on the server, adding repositories is a snap. |
… |
… |
|
371 | 374 | git branch -d anewbranch |
372 | 375 | }}} |
| 376 | |
373 | 377 | = Learn more about Git = |
374 | 378 | |