From 4947b154eecbb5a47add911db0ed35534b327c12 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 4 Dec 2013 21:22:18 +0100 Subject: [PATCH] update cdist hacker with git workflow Signed-off-by: Nico Schottelius --- docs/man/man7/cdist-hacker.text | 66 ++++++++++++++++++++++++++++++++- 1 file changed, 64 insertions(+), 2 deletions(-) diff --git a/docs/man/man7/cdist-hacker.text b/docs/man/man7/cdist-hacker.text index 9dd52d35..b147808e 100644 --- a/docs/man/man7/cdist-hacker.text +++ b/docs/man/man7/cdist-hacker.text @@ -33,7 +33,6 @@ nearby, so grepping for FIXME gives all positions that need to be fixed. Indention is 4 spaces (welcome to the python world). - HOW TO SUBMIT STUFF FOR INCLUSION INTO UPSTREAM CDIST ----------------------------------------------------- If you did some cool changes to cdist, which you value as a benefit for @@ -75,14 +74,77 @@ code and thus such a type introduces redundant functionality that is given by core cdist already. +EXAMPLE GIT WORKFLOW +--------------------- +The following workflow works fine for most developers: + +-------------------------------------------------------------------------------- +# get latest upstream master branch +git clone https://github.com/telmich/cdist.git + +# update if already existing +cd cdist; git fetch -v; git merge origin/master + +# create a new branch for your feature/bugfix +cd cdist # if you haven't done before +git checkout -b documentation_cleanup + +# *hack* +*hack* + +# clone the cdist repository on github if you haven't done so + +# configure your repo to know about your clone (only once) +git remote add github git@github.com:YOURUSERNAME/cdist.git + +# push the new branch to github +git push github documentation_cleanup + +# (or everything) +git push --mirror github + +# create a pull request at github (use a browser) +# *fixthingsbecausequalityassurancefoundissuesinourpatch* +*hack* + +# push code to github again +git push ... # like above + +# add comment that everything should be green now (use a browser) + +# go back to master branch +git checkout master + +# update master branch that includes your changes now +git fetch -v origin +git diff master..origin/master +git merge origin/master +-------------------------------------------------------------------------------- + +If at any point you want to go back to the original master branch, you can +use **git stash** to stash your changes away: + +-------------------------------------------------------------------------------- +# assume you are on documentation_cleanup +git stash + +# change to master and update to most recent upstream version +git checkout master +git fetch -v origin +git merge origin/master +-------------------------------------------------------------------------------- + SEE ALSO -------- - cdist(7) +- git(1) +- git-checkout(1) +- git-stash(1) COPYING ------- -Copyright \(C) 2011-2012 Nico Schottelius. Free use of this software is +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).