Dev Good Practice

Skip to end of metadata
Go to start of metadata

With git

Workflow for old cvs/svn folks is something like :

 $ git pull
 $ hack hack hack
 $ git push
 // fails, because someone else has already pushed to master
 $ git pull
 // this creates some merges
 $ git push

A more quiet workflow :

$ git pull
$ hack hack hack
$ git push
// fails, because someone else has already pushed to master
$ git fetch
// this moves 'origin/master'
$ git rebase origin/master
// this reapplies your local changes on top of origin/master
$ git push

For "part-time" developers, consider this workflow:

$ echo "Create a fork of the repository using GitHub"
$ git clone git@github.com:$USER/jenkins.git $USER-jenkins
$ cd $USER-jenkins
$ git remote add jenkins git@github.com:jenkinsci/jenkins.git
$ echo "create a new branch to modularly hold your changes"
  $ git checkout -b FT-COOL_THING    -OR-
  $ git checkout -b JENKINS-1234
$ git pull --rebase jenkins master
$ echo "hack, test, hack, test"
$ git pull --rebase jenkins master
$ git add --force *
$ git commit -a
$ git push
$ echo "Go to your GitHub page, switch to the right branch, then create a pull request"
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.