2016-05-27 05:29:45 +00:00
<!DOCTYPE html>
<!-- [if IE 8]><html class="no - js lt - ie9" lang="en" > <![endif] -->
<!-- [if gt IE 8]><! --> < html class = "no-js" lang = "en" > <!-- <![endif] -->
< head >
< meta charset = "utf-8" >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
2016-05-27 05:59:19 +00:00
< title > 5. cdist-hacker(7) — cdist 4.1.0 documentation< / title >
2016-05-27 05:29:45 +00:00
< link rel = "stylesheet" href = "../_static/css/theme.css" type = "text/css" / >
2016-05-27 05:59:19 +00:00
< link rel = "top" title = "cdist 4.1.0 documentation" href = "../index.html" / >
2016-05-27 05:29:45 +00:00
< link rel = "next" title = "6. cdist-manifest(7)" href = "cdist-manifest.html" / >
< link rel = "prev" title = "4. cdist-explorer(7)" href = "cdist-explorer.html" / >
< script src = "../_static/js/modernizr.min.js" > < / script >
< / head >
< body class = "wy-body-for-nav" role = "document" >
< div class = "wy-grid-for-nav" >
< nav data-toggle = "wy-nav-shift" class = "wy-nav-side" >
< div class = "wy-side-scroll" >
< div class = "wy-side-nav-search" >
< a href = "../index.html" class = "icon icon-home" > cdist
< / a >
< div class = "version" >
2016-05-27 05:59:19 +00:00
4.1.0
2016-05-27 05:29:45 +00:00
< / div >
< div role = "search" >
< form id = "rtd-search-form" class = "wy-form" action = "../search.html" method = "get" >
< input type = "text" name = "q" placeholder = "Search docs" / >
< input type = "hidden" name = "check_keywords" value = "yes" / >
< input type = "hidden" name = "area" value = "default" / >
< / form >
< / div >
< / div >
< div class = "wy-menu wy-menu-vertical" data-spy = "affix" role = "navigation" aria-label = "main navigation" >
< ul class = "current" >
< li class = "toctree-l1" > < a class = "reference internal" href = "../man1/cdist.html" > 1. cdist(1)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-best-practice.html" > 2. cdist-best-practice(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-bootstrap.html" > 3. cdist-bootstrap(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-explorer.html" > 4. cdist-explorer(7)< / a > < / li >
< li class = "toctree-l1 current" > < a class = "current reference internal" href = "#" > 5. cdist-hacker(7)< / a > < ul class = "simple" >
< / ul >
< / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-manifest.html" > 6. cdist-manifest(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-messaging.html" > 7. cdist-messaging(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-quickstart.html" > 8. cdist-quickstart(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-reference.html" > 9. cdist-reference(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-remote-exec-copy.html" > 10. cdist-remote-exec-copy(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-stages.html" > 11. cdist-stages(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-troubleshooting.html" > 12. cdist-troubleshooting(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-tutorial.html" > 13. cdist-tutorial(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type.html" > 14. cdist-type(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__apt_key.html" > 15. cdist-type__apt_key(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__apt_key_uri.html" > 16. cdist-type__apt_key_uri(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__apt_norecommends.html" > 17. cdist-type__apt_norecommends(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__apt_ppa.html" > 18. cdist-type__apt_ppa(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__apt_source.html" > 19. cdist-type__apt_source(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__apt_update_index.html" > 20. cdist-type__apt_update_index(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__block.html" > 21. cdist-type__block(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__ccollect_source.html" > 22. cdist-type__ccollect_source(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__cdist.html" > 23. cdist-type__cdist(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__cdistmarker.html" > 24. cdist-type__cdistmarker(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__config_file.html" > 25. cdist-type__config_file(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__consul.html" > 26. cdist-type__consul(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__consul_agent.html" > 27. cdist-type__consul_agent(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__consul_check.html" > 28. cdist-type__consul_check(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__consul_reload.html" > 29. cdist-type__consul_reload(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__consul_service.html" > 30. cdist-type__consul_service(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__consul_template.html" > 31. cdist-type__consul_template(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__consul_template_template.html" > 32. cdist-type__consul_template_template(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__consul_watch_checks.html" > 33. cdist-type__consul_watch_checks(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__consul_watch_event.html" > 34. cdist-type__consul_watch_event(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__consul_watch_key.html" > 35. cdist-type__consul_watch_key(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__consul_watch_keyprefix.html" > 36. cdist-type__consul_watch_keyprefix(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__consul_watch_nodes.html" > 37. cdist-type__consul_watch_nodes(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__consul_watch_service.html" > 38. cdist-type__consul_watch_service(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__consul_watch_services.html" > 39. cdist-type__consul_watch_services(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__cron.html" > 40. cdist-type__cron(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__debconf_set_selections.html" > 41. cdist-type__debconf_set_selections(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__directory.html" > 42. cdist-type__directory(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__dog_vdi.html" > 43. cdist-type__dog_vdi(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__file.html" > 44. cdist-type__file(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__firewalld_rule.html" > 45. cdist-type__firewalld_rule(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__git.html" > 46. cdist-type__git(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__group.html" > 47. cdist-type__group(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__hostname.html" > 48. cdist-type__hostname(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__iptables_apply.html" > 49. cdist-type__iptables_apply(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__iptables_rule.html" > 50. cdist-type__iptables_rule(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__issue.html" > 51. cdist-type__issue(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__jail.html" > 52. cdist-type__jail(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__key_value.html" > 53. cdist-type__key_value(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__line.html" > 54. cdist-type__line(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__link.html" > 55. cdist-type__link(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__locale.html" > 56. cdist-type__locale(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__motd.html" > 57. cdist-type__motd(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__mount.html" > 58. cdist-type__mount(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__mysql_database.html" > 59. cdist-type__mysql_database(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__package.html" > 60. cdist-type__package(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__package_apt.html" > 61. cdist-type__package_apt(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__package_emerge.html" > 62. cdist-type__package_emerge(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__package_emerge_dependencies.html" > 63. cdist-type__package_emerge_dependencies(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__package_luarocks.html" > 64. cdist-type__package_luarocks(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__package_opkg.html" > 65. cdist-type__package_opkg(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__package_pacman.html" > 66. cdist-type__package_pacman(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__package_pip.html" > 67. cdist-type__package_pip(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__package_pkg_freebsd.html" > 68. cdist-type__package_pkg_freebsd(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__package_pkg_openbsd.html" > 69. cdist-type__package_pkg(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__package_pkgng_freebsd.html" > 70. cdist-type__package_pkgng_freebsd(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__package_rubygem.html" > 71. cdist-type__package_rubygem(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__package_update_index.html" > 72. cdist-type__package_update_index(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__package_upgrade_all.html" > 73. cdist-type__package_upgrade_all(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__package_yum.html" > 74. cdist-type__package_yum(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__package_zypper.html" > 75. cdist-type__package_zypper(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__pacman_conf.html" > 76. cdist-type__pacman_conf(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__pacman_conf_integrate.html" > 77. cdist-type__pacman_conf_integrate(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__pf_apply.html" > 78. cdist-type__pf_apply(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__pf_ruleset.html" > 79. cdist-type__pf_ruleset(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__postfix.html" > 80. cdist-type__postfix(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__postfix_master.html" > 81. cdist-type__postfix_master(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__postfix_postconf.html" > 82. cdist-type__postfix_postconf(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__postfix_postmap.html" > 83. cdist-type__postfix_postmap(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__postfix_reload.html" > 84. cdist-type__postfix_reload(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__postgres_database.html" > 85. cdist-type__postgres_database(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__postgres_role.html" > 86. cdist-type__postgres_role(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__process.html" > 87. cdist-type__process(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__pyvenv.html" > 88. cdist-type__pyvenv(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__qemu_img.html" > 89. cdist-type__qemu_img(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__rbenv.html" > 90. cdist-type__rbenv(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__rsync.html" > 91. cdist-type__rsync(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__rvm.html" > 92. cdist-type__rvm(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__rvm_gem.html" > 93. cdist-type__rvm_gemset(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__rvm_gemset.html" > 94. cdist-type__rvm_gemset(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__rvm_ruby.html" > 95. cdist-type__rvm_ruby(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__ssh_authorized_key.html" > 96. cdist-type__ssh_authorized_key(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__ssh_authorized_keys.html" > 97. cdist-type__ssh_authorized_keys(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__ssh_dot_ssh.html" > 98. cdist-type__ssh_dot_ssh(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__staged_file.html" > 99. cdist-type__staged_file(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__start_on_boot.html" > 100. cdist-type__start_on_boot(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__timezone.html" > 101. cdist-type__timezone(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__update_alternatives.html" > 102. cdist-type__update_alternatives(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__user.html" > 103. cdist-type__user(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__user_groups.html" > 104. cdist-type__user_groups(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__yum_repo.html" > 105. cdist-type__yum_repo(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__zypper_repo.html" > 106. cdist-type__zypper_repo(7)< / a > < / li >
< li class = "toctree-l1" > < a class = "reference internal" href = "cdist-type__zypper_service.html" > 107. cdist-type__zypper_service(7)< / a > < / li >
< / ul >
< / div >
< / div >
< / nav >
< section data-toggle = "wy-nav-shift" class = "wy-nav-content-wrap" >
< nav class = "wy-nav-top" role = "navigation" aria-label = "top navigation" >
< i data-toggle = "wy-nav-top" class = "fa fa-bars" > < / i >
< a href = "../index.html" > cdist< / a >
< / nav >
< div class = "wy-nav-content" >
< div class = "rst-content" >
< div role = "navigation" aria-label = "breadcrumbs navigation" >
< ul class = "wy-breadcrumbs" >
< li > < a href = "../index.html" > Docs< / a > » < / li >
< li > 5. cdist-hacker(7)< / li >
< li class = "wy-breadcrumbs-aside" >
< a href = "../_sources/man7/cdist-hacker.txt" rel = "nofollow" > View page source< / a >
< / li >
< / ul >
< hr / >
< / div >
< div role = "main" class = "document" itemscope = "itemscope" itemtype = "http://schema.org/Article" >
< div itemprop = "articleBody" >
< div class = "section" id = "cdist-hacker-7" >
< h1 > 5. cdist-hacker(7)< a class = "headerlink" href = "#cdist-hacker-7" title = "Permalink to this headline" > ¶< / a > < / h1 >
< p > How to get (stuff) into cdist< / p >
< p > Nico Schottelius < < a class = "reference external" href = "mailto:nico-cdist--%40--schottelius.org" > nico-cdist--< span > @ < / span > --schottelius< span > . < / span > org< / a > > < / p >
< div class = "section" id = "welcome" >
< h2 > 5.1. WELCOME< a class = "headerlink" href = "#welcome" title = "Permalink to this headline" > ¶< / a > < / h2 >
< p > Welcome dear hacker! I invite you to a tour of pointers to
get into the usable configuration mangament system, cdist.< / p >
< p > The first thing to know is probably that cdist is brought to
you by people who care about how code looks like and who think
twice before merging or implementing a feature: Less features
with good usability are far better than the opposite.< / p >
< / div >
< div class = "section" id = "reporting-bugs" >
< h2 > 5.2. REPORTING BUGS< a class = "headerlink" href = "#reporting-bugs" title = "Permalink to this headline" > ¶< / a > < / h2 >
< p > If you believe you’ ve found a bug and verified that it is
in the latest version, drop a mail to the cdist mailing list,
subject prefixed with “ [BUG] ” or create an issue on github.< / p >
< / div >
< div class = "section" id = "coding-conventions-everywhere" >
< h2 > 5.3. CODING CONVENTIONS (EVERYWHERE)< a class = "headerlink" href = "#coding-conventions-everywhere" title = "Permalink to this headline" > ¶< / a > < / h2 >
< p > If something should be better done or needs to fixed, add the word FIXME
nearby, so grepping for FIXME gives all positions that need to be fixed.< / p >
< p > Indention is 4 spaces (welcome to the python world).< / p >
< / div >
< div class = "section" id = "how-to-submit-stuff-for-inclusion-into-upstream-cdist" >
< h2 > 5.4. HOW TO SUBMIT STUFF FOR INCLUSION INTO UPSTREAM CDIST< a class = "headerlink" href = "#how-to-submit-stuff-for-inclusion-into-upstream-cdist" title = "Permalink to this headline" > ¶< / a > < / h2 >
< p > If you did some cool changes to cdist, which you value as a benefit for
everybody using cdist, you’ re welcome to propose inclusion into upstream.< / p >
< p > There are though some requirements to ensure your changes don’ t break others
work nor kill the authors brain:< / p >
< ul >
< li > < p class = "first" > All files should contain the usual header (Author, Copying, etc.)< / p >
< / li >
< li > < p class = "first" > Code submission must be done via git< / p >
< / li >
< li > < p class = "first" > Do not add cdist/conf/manifest/init - This file should only be touched in your
private branch!< / p >
< / li >
< li > < p class = "first" > Code to be included should be branched of the upstream “ master” branch< / p >
< blockquote >
< div > < ul class = "simple" >
< li > Exception: Bugfixes to a version branch< / li >
< / ul >
< / div > < / blockquote >
< / li >
< li > < p class = "first" > On a merge request, always name the branch I should pull from< / p >
< / li >
< li > < p class = "first" > Always ensure < strong > all< / strong > manpages build. Use < strong > ./build man< / strong > to test.< / p >
< / li >
< li > < p class = "first" > If you developed more than < strong > one< / strong > feature, consider submitting them in
separate branches. This way one feature can already be included, even if
the other needs to be improved.< / p >
< / li >
< / ul >
< p > As soon as your work meets these requirements, write a mail
for inclusion to the mailinglist < strong > cdist at cdist – at – l.schottelius.org< / strong >
or open a pull request at < a class = "reference external" href = "http://github.com/telmich/cdist" > http://github.com/telmich/cdist< / a > .< / p >
< / div >
< div class = "section" id = "how-to-submit-a-new-type" >
< h2 > 5.5. HOW TO SUBMIT A NEW TYPE< a class = "headerlink" href = "#how-to-submit-a-new-type" title = "Permalink to this headline" > ¶< / a > < / h2 >
< p > For detailled information about types, see cdist-type(7).< / p >
< p > Submitting a type works as described above, with the additional requirement
that a corresponding manpage named man.text in asciidoc format with
the manpage-name “ cdist-type__NAME” is included in the type directory
AND asciidoc is able to compile it (i.e. do NOT have to many “ =” in the second
line).< / p >
< p > Warning: Submitting “ exec” or “ run” types that simply echo their parameter in
< strong > gencode< / strong > will not be accepted, because they are of no use. Every type can output
code and thus such a type introduces redundant functionality that is given by
core cdist already.< / p >
< / div >
< div class = "section" id = "example-git-workflow" >
< h2 > 5.6. EXAMPLE GIT WORKFLOW< a class = "headerlink" href = "#example-git-workflow" title = "Permalink to this headline" > ¶< / a > < / h2 >
< p > The following workflow works fine for most developers:< / p >
< div class = "highlight-default" > < div class = "highlight" > < pre > < span > < / span > < span class = "c1" > # get latest upstream master branch< / span >
< span class = "n" > git< / span > < span class = "n" > clone< / span > < span class = "n" > https< / span > < span class = "p" > :< / span > < span class = "o" > //< / span > < span class = "n" > github< / span > < span class = "o" > .< / span > < span class = "n" > com< / span > < span class = "o" > /< / span > < span class = "n" > telmich< / span > < span class = "o" > /< / span > < span class = "n" > cdist< / span > < span class = "o" > .< / span > < span class = "n" > git< / span >
< span class = "c1" > # update if already existing< / span >
< span class = "n" > cd< / span > < span class = "n" > cdist< / span > < span class = "p" > ;< / span > < span class = "n" > git< / span > < span class = "n" > fetch< / span > < span class = "o" > -< / span > < span class = "n" > v< / span > < span class = "p" > ;< / span > < span class = "n" > git< / span > < span class = "n" > merge< / span > < span class = "n" > origin< / span > < span class = "o" > /< / span > < span class = "n" > master< / span >
< span class = "c1" > # create a new branch for your feature/bugfix< / span >
< span class = "n" > cd< / span > < span class = "n" > cdist< / span > < span class = "c1" > # if you haven' t done before< / span >
< span class = "n" > git< / span > < span class = "n" > checkout< / span > < span class = "o" > -< / span > < span class = "n" > b< / span > < span class = "n" > documentation_cleanup< / span >
< span class = "c1" > # *hack*< / span >
< span class = "o" > *< / span > < span class = "n" > hack< / span > < span class = "o" > *< / span >
< span class = "c1" > # clone the cdist repository on github if you haven' t done so< / span >
< span class = "c1" > # configure your repo to know about your clone (only once)< / span >
< span class = "n" > git< / span > < span class = "n" > remote< / span > < span class = "n" > add< / span > < span class = "n" > github< / span > < span class = "n" > git< / span > < span class = "nd" > @github< / span > < span class = "o" > .< / span > < span class = "n" > com< / span > < span class = "p" > :< / span > < span class = "n" > YOURUSERNAME< / span > < span class = "o" > /< / span > < span class = "n" > cdist< / span > < span class = "o" > .< / span > < span class = "n" > git< / span >
< span class = "c1" > # push the new branch to github< / span >
< span class = "n" > git< / span > < span class = "n" > push< / span > < span class = "n" > github< / span > < span class = "n" > documentation_cleanup< / span >
< span class = "c1" > # (or everything)< / span >
< span class = "n" > git< / span > < span class = "n" > push< / span > < span class = "o" > --< / span > < span class = "n" > mirror< / span > < span class = "n" > github< / span >
< span class = "c1" > # create a pull request at github (use a browser)< / span >
< span class = "c1" > # *fixthingsbecausequalityassurancefoundissuesinourpatch*< / span >
< span class = "o" > *< / span > < span class = "n" > hack< / span > < span class = "o" > *< / span >
< span class = "c1" > # push code to github again< / span >
< span class = "n" > git< / span > < span class = "n" > push< / span > < span class = "o" > ...< / span > < span class = "c1" > # like above< / span >
< span class = "c1" > # add comment that everything should be green now (use a browser)< / span >
< span class = "c1" > # go back to master branch< / span >
< span class = "n" > git< / span > < span class = "n" > checkout< / span > < span class = "n" > master< / span >
< span class = "c1" > # update master branch that includes your changes now< / span >
< span class = "n" > git< / span > < span class = "n" > fetch< / span > < span class = "o" > -< / span > < span class = "n" > v< / span > < span class = "n" > origin< / span >
< span class = "n" > git< / span > < span class = "n" > diff< / span > < span class = "n" > master< / span > < span class = "o" > ..< / span > < span class = "n" > origin< / span > < span class = "o" > /< / span > < span class = "n" > master< / span >
< span class = "n" > git< / span > < span class = "n" > merge< / span > < span class = "n" > origin< / span > < span class = "o" > /< / span > < span class = "n" > master< / span >
< / pre > < / div >
< / div >
< p > If at any point you want to go back to the original master branch, you can
use < strong > git stash< / strong > to stash your changes away:< / p >
< div class = "highlight-default" > < div class = "highlight" > < pre > < span > < / span > < span class = "c1" > # assume you are on documentation_cleanup< / span >
< span class = "n" > git< / span > < span class = "n" > stash< / span >
< span class = "c1" > # change to master and update to most recent upstream version< / span >
< span class = "n" > git< / span > < span class = "n" > checkout< / span > < span class = "n" > master< / span >
< span class = "n" > git< / span > < span class = "n" > fetch< / span > < span class = "o" > -< / span > < span class = "n" > v< / span > < span class = "n" > origin< / span >
< span class = "n" > git< / span > < span class = "n" > merge< / span > < span class = "n" > origin< / span > < span class = "o" > /< / span > < span class = "n" > master< / span >
< / pre > < / div >
< / div >
< p > Similar when you want to develop another new feature, you go back
to the master branch and create another branch based on it:< / p >
< div class = "highlight-default" > < div class = "highlight" > < pre > < span > < / span > < span class = "c1" > # change to master and update to most recent upstream version< / span >
< span class = "n" > git< / span > < span class = "n" > checkout< / span > < span class = "n" > master< / span >
< span class = "n" > git< / span > < span class = "n" > fetch< / span > < span class = "o" > -< / span > < span class = "n" > v< / span > < span class = "n" > origin< / span >
< span class = "n" > git< / span > < span class = "n" > merge< / span > < span class = "n" > origin< / span > < span class = "o" > /< / span > < span class = "n" > master< / span >
< span class = "n" > git< / span > < span class = "n" > checkout< / span > < span class = "o" > -< / span > < span class = "n" > b< / span > < span class = "n" > another_feature< / span >
< / pre > < / div >
< / div >
< p > (you can repeat the code above for as many features as you want to develop
in parallel)< / p >
< / div >
< div class = "section" id = "see-also" >
< h2 > 5.7. SEE ALSO< a class = "headerlink" href = "#see-also" title = "Permalink to this headline" > ¶< / a > < / h2 >
< ul class = "simple" >
< li > < a class = "reference external" href = "../man1/cdist.html" > cdist(1)< / a > < / li >
< li > git(1)< / li >
< li > git-checkout(1)< / li >
< li > git-stash(1)< / li >
< / ul >
< / div >
< div class = "section" id = "copying" >
< h2 > 5.8. COPYING< a class = "headerlink" href = "#copying" title = "Permalink to this headline" > ¶< / a > < / h2 >
< p > Copyright (C) 2011-2013 Nico Schottelius. Free use of this software is
granted under the terms of the GNU General Public License version 3 (GPLv3).< / p >
< / div >
< / div >
< / div >
< / div >
< footer >
< div class = "rst-footer-buttons" role = "navigation" aria-label = "footer navigation" >
< a href = "cdist-manifest.html" class = "btn btn-neutral float-right" title = "6. cdist-manifest(7)" accesskey = "n" > Next < span class = "fa fa-arrow-circle-right" > < / span > < / a >
< a href = "cdist-explorer.html" class = "btn btn-neutral" title = "4. cdist-explorer(7)" accesskey = "p" > < span class = "fa fa-arrow-circle-left" > < / span > Previous< / a >
< / div >
< hr / >
< div role = "contentinfo" >
< p >
© Copyright .
< / p >
< / div >
Built with < a href = "http://sphinx-doc.org/" > Sphinx< / a > using a < a href = "https://github.com/snide/sphinx_rtd_theme" > theme< / a > provided by < a href = "https://readthedocs.org" > Read the Docs< / a > .
< / footer >
< / div >
< / div >
< / section >
< / div >
< script type = "text/javascript" >
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../',
2016-05-27 05:59:19 +00:00
VERSION:'4.1.0',
2016-05-27 05:29:45 +00:00
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
< / script >
< script type = "text/javascript" src = "../_static/jquery.js" > < / script >
< script type = "text/javascript" src = "../_static/underscore.js" > < / script >
< script type = "text/javascript" src = "../_static/doctools.js" > < / script >
< script type = "text/javascript" src = "../_static/js/theme.js" > < / script >
< script type = "text/javascript" >
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
< / script >
< / body >
< / html >