This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
devel:git-commit-guidelines [2014/11/10 14:58] miconda [Library Commits] |
devel:git-commit-guidelines [2014/12/15 13:56] miconda [Cloning GIT Repository] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== GIT Commit Guidelines ====== | ====== GIT Commit Guidelines ====== | ||
+ | |||
+ | ===== GIT Repository Location ===== | ||
+ | |||
+ | Starting with December 15, 2014, the main GITH repository of Kamailio project is hosted on Github at: | ||
+ | |||
+ | * https:// | ||
+ | |||
+ | A read-only mirror is maintained at: | ||
+ | |||
+ | * git.kamailio.org (still accessible via git.sip-router.org) | ||
===== Cloning GIT Repository ===== | ===== Cloning GIT Repository ===== | ||
Line 19: | Line 29: | ||
< | < | ||
- | git clone ssh://userid@git.sip-router.org/sip-router | + | git clone https:// |
+ | </ | ||
+ | |||
+ | or if you prefer via ssh: | ||
+ | |||
+ | < | ||
+ | git clone ssh+git://git@github.com/kamailio/ | ||
</ | </ | ||
- | Replace **userid** with your developer GIT username. | + | You may be asked for your Github |
The clone is tracking automatically the remote **master** branch (the development version). | The clone is tracking automatically the remote **master** branch (the development version). | ||
Line 31: | Line 47: | ||
< | < | ||
- | git clone --depth 1 git://git.sip-router.org/sip-router | + | git clone https:// |
+ | </ | ||
+ | |||
+ | You can also clone (read-only, not for developers that want to push back commits) from the real-time mirror server: | ||
+ | |||
+ | < | ||
+ | git clone --depth 1 git://git.kamailio.org/kamailio | ||
</ | </ | ||
Line 205: | Line 227: | ||
lib/ | lib/ | ||
</ | </ | ||
+ | ===== Backporting Commits ===== | ||
+ | |||
+ | Commits that include fixes to issues affecting stable branches must be backported using: | ||
+ | |||
+ | < | ||
+ | git cherry-pick -x _COMMIT_HASH_ | ||
+ | </ | ||
+ | |||
+ | Example: | ||
+ | |||
+ | < | ||
+ | git cherry-pick -x a8bc3d | ||
+ | </ | ||
+ | |||
+ | Parameter **-x** is important to be able to keep track easier of backported commits. | ||
+ | |||
+ | The **git cherry-pick** command must be executed inside the branch where the commit has to be backported, after doing a **git pull origin**. | ||
+ | |||
+ | **Note**: the commit must be done first time in master, then backported to the latest stable branch, using cherry-pick -x with commit id from master. The backported commit gets a new id in the latest stable branch, that commit id must be used when cherry-picking to the previous stable branch. When willing to backport to older versions, keep using the commit id from the next stable branch. | ||
+ | |||
===== Useful Commands ===== | ===== Useful Commands ===== | ||