Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
git:tips [2009/02/15 23:00] 78.102.130.97 |
git:tips [2009/07/21 14:35] (current) andrei --rebase to git pull, in case there are local changes on the local master |
||
---|---|---|---|
Line 27: | Line 27: | ||
The configuration above will fetch all tags from both repositories explicitly and will store them in subdirectories under .git/ | The configuration above will fetch all tags from both repositories explicitly and will store them in subdirectories under .git/ | ||
+ | |||
+ | ====== GIT commands for merging of modules | ||
+ | This will show you how the git commands to merge modules, e.g. ser's avpops module is removed and K's avpops module is used as comon module. | ||
+ | < | ||
+ | # we start in the local master branch | ||
+ | git checkout master | ||
+ | |||
+ | # create a new local branch called " | ||
+ | # the remote master branch, and checkout into the newly created branch | ||
+ | git checkout -b darilion/ | ||
+ | |||
+ | # remove the old ser module | ||
+ | git rm -r modules_s/ | ||
+ | |||
+ | # move the Kamailio module into the common modules directory | ||
+ | git mv modules_k/ | ||
+ | |||
+ | # do whatever is need, eg. modify the code, ... | ||
+ | |||
+ | # check if sip-router builds and the code is working as expected | ||
+ | |||
+ | # check the status (modified files) | ||
+ | git status | ||
+ | |||
+ | # add all modifications for the next commit | ||
+ | git add . | ||
+ | |||
+ | # commit the changes (which were added in the previous step) | ||
+ | # (this will commit into the local working branch, in this case darilion/ | ||
+ | # make sure to add a commit message according to these rules: | ||
+ | # | ||
+ | git commit | ||
+ | |||
+ | # verify the commit | ||
+ | git log -1 | ||
+ | |||
+ | # prepare for push into the remote master branch: make sure | ||
+ | # that our local branch is up2date with commits added to | ||
+ | # remote main branch | ||
+ | git fetch origin | ||
+ | git rebase origin/ | ||
+ | |||
+ | # push our changes from the local " | ||
+ | # into the remote master branch | ||
+ | git push origin darilion/ | ||
+ | |||
+ | # cleanup: change into another local branch and delete the local avpops branch | ||
+ | git checkout master | ||
+ | git pull --rebase origin master # fetch previously commited commit | ||
+ | git branch -d darilion/ | ||
+ | </ | ||