-
Notifications
You must be signed in to change notification settings - Fork 211
githowto
auto edited this page May 1, 2012
·
21 revisions
This article will implement workflows for the following use cases:
;Consume Pyjamas :Get :Update :Test ;Produce Pyjamas :Hack :Contribute :Develop
The article assumes some prior exposure to git and it's concepts. If you have never used git, and/or dont know what/how to get it, check out the following:
-
Official Site
http://git-scm.com -
Everyday Git
http://www.kernel.org/pub/software/scm/git/docs/everyday.html -
ProGit Book
http://progit.org/book
Instructions will adhere to the following format:
[<num> ]# <general command>
[<num><alt>]# <alternate command>
<num> . <general explanation>
<alt> ) <alternate explanation>Commands lacking an alt letter are general and apply to all methods; else the command is specific to an alternative workflow. Follow the same alt letter (or none) throughout the document. The author recommends, and uses, alt b.
[1 ]# git clone https://github.com/pyjs/pyjs.git [2 ]# cd pyjamas [3b ]# git checkout --track -b foo origin/master [4b ]# git branch -d master
- Clone the codebase into a folder called ##pyjamas##
- Move to the the working directory
- ...
b) Create a new branch called foo, tracking ##origin/master##, and check it out. ##--track## allows ##git pull## to be used without arguments (by default, ##--track## is implied for remote branches; included for completeness) - ...
b) Remove the default ##local/master## branch. This branch adds unnecessary steps to your workflow, and exists only by convention; best to learn how to use git explicitly, learning both why you must execute command X, and how it works.
[1 ]# cd pyjamas [2a ]# git pull [2b ]# git remote update origin [3b ]# git merge origin/master
- Move to the the working directory
- Fetch and update all remote branches (refs/remotes/origin) for ##origin##, and ...
a) ... automatically merge into ##local/master##, or the current branch (if current branch is tracking another branch)
b) ... do nothing further - ...
b) Merge updated ##origin/master## into the current branch ##foo##
TODO
TODO
[1] # cd pyjamas
(most likely your pyjamas installation is in ~/pyjamas/pyjamas)
[2] # git diff > patch.diffTODO