Differences

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

Link to this comparison view

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/refs/tags to avoid conflicts in file names. Because you download tags explicitly you can tell git-fetch not to download any tags using the tagopt option. The configuration above will fetch all tags from both repositories explicitly and will store them in subdirectories under .git/refs/tags to avoid conflicts in file names. Because you download tags explicitly you can tell git-fetch not to download any tags using the tagopt option.
 +
 +====== 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.
 +<code>
 +# we start in the local master branch
 +git checkout master
 +
 +# create a new local branch called "darilion/avpops" based on 
 +# the remote master branch, and checkout into the newly created branch
 +git checkout -b darilion/avpops origin/master
 +
 +# remove the old ser module
 +git rm -r modules_s/avpops/
 +
 +# move the Kamailio module into the common modules directory
 +git mv modules_k/avpops/ modules/
 +
 +# 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/avpops)
 +# make sure to add a commit message according to these rules:
 +#   http://sip-router.org/wiki/devel/git-commit-guidelines
 +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/master
 +
 +# push our changes from the local "darilion/avpops" branch 
 +# into the remote master branch
 +git push origin darilion/avpops:master
 +
 +# 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/avpops
 +</code>
  

Navigation

Wiki

Other

QR Code
QR Code git:tips (generated for current page)