User Tools

  • Logged in as: anonymous (anonymous)
  • Log Out

Site Tools


mantisbt:git_submodules

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
mantisbt:git_submodules [2014/04/30 11:53] – Added section: Updating a Library's submodule dregadmantisbt:git_submodules [2014/04/30 12:27] – Update master branch from upstream, push tags and note dregad
Line 120: Line 120:
 Submodule path 'library/adodb': checked out '<commit sha>' Submodule path 'library/adodb': checked out '<commit sha>'
 </code> </code>
 +
 +
 +
 +
  
  
Line 127: Line 131:
  
 The examples given here are for the ADOdb library, but the same logic should apply (possibly with some variations) to other submodules as well. The examples given here are for the ADOdb library, but the same logic should apply (possibly with some variations) to other submodules as well.
-We assume that you have a local repository configured with the appropriate remotes (*upstreamfor the library's official repository and *originfor the MantisBT fork)+We assume that you already have a local repository configured with the appropriate remotes (//upstream// for the library's official repository and //origin// for the MantisBT fork)
  
-  - Update the library's fork in the *mantisbtGithub organization +  - Update the library's fork in the //mantisbt// Github organization 
     * Get the latest from upstream <code>     * Get the latest from upstream <code>
 cd /path/to/local/adodb cd /path/to/local/adodb
 git fetch upstream git fetch upstream
 +</code>
 +    * Optional: update the //master// branch <code>
 +git rebase upstream/master master
 </code> </code>
     * Update the branch <code>     * Update the branch <code>
Line 140: Line 147:
     * Resolve any conflicts     * Resolve any conflicts
     * Push changes to the fork <code>     * Push changes to the fork <code>
-git push origin +git push origin --tags master mantis-1.3 
-</code>+</code> Note that it's not strictly necessary to push the tags or the master branch. Having the tags allows a better description of the submodule's current commit when running ''git submodule'' (see example at the end of this section)
   - Update the submodule   - Update the submodule
     * Go to your local mantisbt repository and update it<code>     * Go to your local mantisbt repository and update it<code>
Line 157: Line 164:
   - Commit the changes <code>   - Commit the changes <code>
 git commit -a git commit -a
 +</code>
 +
 +At this point, checking the submodules' status should give you a "clean" list , e.g. (notice no '+' sign in column 1)
 +
 +<code>
 +$ git submodule 
 + 9346d288a1b7f7a50cc35b6a0e56d29e9d000ecf adodb (v5.19-6-g9346d28)
 + 75a4e5595c0dfcb2e2e1e41b9ba2282828d3f292 disposable (release-2.0.0-3-g75a4e55)
 + cb771839899d9f6be9f1268b986c30327ff1199b phpmailer (v5.2.6-2-gcb77183)
 + 41beaddd279c695aacb63407e2c98b04b7eaff51 securimage (heads/mantis)
 </code> </code>
  
mantisbt/git_submodules.txt · Last modified: 2014/04/30 13:00 by dregad

Driven by DokuWiki