Changes between Version 17 and Version 18 of Developer/Git/Users
- Timestamp:
- 06/02/17 00:44:19 (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Developer/Git/Users
v17 v18 41 41 }}} 42 42 This command will update all your local branches with any new code revisions available on the central repository. 43 43 44 = Making Changes = 44 45 45 Git allows you to make changes in the RTEMS source tree and track those changes locally. First you need to clone the repository: 46 Git allows you to make changes in the RTEMS source tree and track those changes locally. We recommend you make all your changes in local branches. If you are working on a few different changes or a progression of changes it is best to use a local branch for each change. 47 48 A branch for each change lets your repo's master branch track the upstream RTEMS's master branch without interacting with any of the changes you are working on. A completed change is emailed to the developers list for review and this can take time. While this is happening the upstream's master branch may be updated and you may need to rebase your work and test again if you are required to change of update your patch. A local branch isolates a specific change from others and helps you manage the process. 49 50 First you need to clone the repository: 46 51 {{{ 47 52 git clone git://git.rtems.org/rtems.git rtems … … 51 56 cd rtems 52 57 git pull 58 }}} 59 Create a local branch to make your changes in, in this example the change is `faster-context-switch`: 60 {{{ 61 git checkout -b faster-context-switch 53 62 }}} 54 63 Next make your changes to files. If you add, delete or move/rename files you need to inform Git … … 62 71 git commit -a 63 72 }}} 64 The -a flag commits all the changes that were made, but you can also control which changes to commit by individually adding files as you modify them by using. You can also specify other options to commit, such as a message with the -mflag.73 The `-a` flag commits all the changes that were made, but you can also control which changes to commit by individually adding files as you modify them by using. You can also specify other options to commit, such as a message with the `-m` flag. 65 74 {{{ 66 75 git add /some/changed/files 67 76 git commit 68 77 }}} 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. 78 Create a patch from your branch, in this case we have two commits we want to send for review: 79 {{{ 80 git format-patch -2 81 }}} 82 We could send the patches directly to the developer's list for review: 83 {{{ 84 git send-email --to=devel@rtems.org -2 85 }}} 86 There are new changes pushed to the RTEMS's master branch and our local branch needs to be updated: 87 {{{ 88 git checkout master 89 git pull 90 git checkout faster-context-switch 91 git rebase 92 }}} 70 93 71 94 = Working with Branches = … … 271 294 git config --global user.email name@domain.com 272 295 }}} 296 297 Please user a real name, we do not allow pseudonyms or anonymous contributions. 273 298 274 299 = Submitting a Patch =