|
On June 20, 2009, the emc2 project began using [git] as its revision control system, replacing CVS. [Read the announcement] |
|
On June 20, 2009, the LinuxCNC project began using [git] as its revision control system, replacing CVS. [Read the announcement] |
|
This page collects instructions and guidelines for using git with emc2. There |
|
This page collects instructions and guidelines for using git with LinuxCNC. There |
|
the linuxcnc.org package server in the emc2.3 directory. If you already have |
|
the linuxcnc.org package server in the linuxcnc2.3 directory. If you already have |
|
git clone git://git.linuxcnc.org/git/emc2.git emc2-dev this will create a new local directory 'emc2-dev' and fetch the full history of |
|
git clone git://git.linuxcnc.org/git/linuxcnc.git linuxcnc-dev this will create a new local directory 'linuxcnc-dev' and fetch the full history of |
|
The repo created by this clone command is a full repo: it has all of history, |
|
The repo created by this clone command is a full repo: it has all of the history, |
|
git clone ssh://developername@git.linuxcnc.org/git/emc2.git emc2-dev |
|
git clone ssh://developername@git.linuxcnc.org/git/linuxcnc.git linuxcnc-dev |
|
called "emc2-dev", containing a full clone of the linuxcnc.org emc2 git repo. All the commands below assume that you are in the emc2-dev directory unless |
|
called "linuxcnc-dev", containing a full clone of the linuxcnc.org git repo. All the commands below assume that you are in the linuxcnc-dev directory unless |
|
git pull git://git.unpythonic.net/emc2-ignores.git master |
|
git pull git://git.unpythonic.net/linuxcnc-ignores.git master |
|
To check out a branch for example the 2.4 branch: |
|
To check out a branch, for example, the 2.5 branch: |
|
git checkout -b v2.4_branch origin/v2.4_branch |
|
git checkout -b v2.5_branch origin/v2.5_branch |
|
To work on the 2.4 branch instead of 'master' ('master' is the git equivalent of cvs 'TRUNK'): git branch --track v2.4_branch origin/v2.4_branch git checkout v2.4_branch |
|
To work on the 2.5 branch instead of 'master' ('master' is the git equivalent of cvs 'TRUNK'): git branch --track v2.5_branch origin/v2.5_branch git checkout v2.5_branch |
|
git checkout v2.4_branch |
|
git checkout v2.5_branch |
|
The following sequence creates "emc2.3-dev" alongside "emc2-dev", then uses 'git relink' to save disk space, then switches to the v2_3_branch in the emc2.3-dev directory: cp -r emc2-dev/ emc2.3-dev git relink emc2.3-dev/ emc2-dev/ cd emc2.3-dev git branch v2_3_branch origin/v2_3_branch git checkout v2_3_branch |
|
The following sequence creates "linuxcnc2.5-dev" alongside "linuxcnc-dev", then uses 'git relink' to save disk space, then switches to the v2_5_branch in the linuxcnc2.5-dev directory: cp -r linuxcnc-dev/ linuxcnc2.5-dev git relink linuxcnc2.5-dev/ linuxcnc-dev/ cd linuxcnc2.5-dev git branch v2_5_branch origin/v2_5_branch git checkout v2_5_branch |
|
For bugfixes, use the merge-base of master and v2.4_branch. You can make a bugfix and merge it into both branches like so: |
|
For v2.5_branch bugfixes, use the merge-base of master and v2.5_branch. You can make a bugfix and merge it into both branches like so: git checkout $(git merge-base origin/v2.5_branch origin/master) git checkout -b descriptive-bugfix-branch-name edit/compile/test/commit git checkout master git merge descriptive-bugfix-branch-name compile/test git checkout v2.5_branch git merge descriptive-bugfix-branch-name compile/test Check with cradek before pushing changes to v2.5_branch. If your bugfix is approved for v2.5_branch, then it will also be fixed on master when changes in the branch are merged up. For v2.4_branch bugfixes, use the merge-base of master and v2.4_branch. You can make a bugfix and merge it into both branches like so: |
|
Check with jepler before pushing changes to v2.4_branch. If your bugfix is approved for v2.4_branch, then it will also be fixed on master when changes in the branch are merged up. |
|
Check with jepler before pushing changes to v2.4_branch. If your bugfix is approved for v2.4_branch, then it will also be fixed on master when changes in the branch are merged up. |
|
While the branch HEAD will build, not every commit might build in such a case, and that breaks git-bisect (find by binary search the change that introduced a bug) - something somebody else might use lateron to find the commit which introduced a bug. So beyond making sure your branch builds, it is important to assure every single commit builds as well. |
|
While the branch HEAD will build, not every commit might build in such a case, and that breaks git-bisect (find by binary search the change that introduced a bug) - something somebody else might use later on to find the commit which introduced a bug. So beyond making sure your branch builds, it is important to assure every single commit builds as well. |
|
$ cd emc2-dev |
|
$ cd linuxcnc-dev |
|
* On the #emc-devel IRC channel, post a link to your patch (on a site like http://pastebin.ca or on a private server) and ask if a developer will look at it. When using a 'pastebin'-type service, choose the option that retains the submission indefinitely. |
|
* On the #linuxcnc-devel IRC channel, post a link to your patch (on a site like http://pastebin.ca or on a private server) and ask if a developer will look at it. When using a 'pastebin'-type service, choose the option that retains the submission indefinitely. |
|
cd emc2-dev |
|
cd linuxcnc-dev |
|
If you get errors trying to copy your emc2-dev directory to a usb stick then tar it up first. From the directory above emc2-dev tar cvf emc-dev.tar emc-dev then copy emc2-dev.tar to the stick |
|
If you get errors trying to copy your linuxcnc-dev directory to a usb stick then tar it up first. From the directory above linuxcnc-dev tar cvf linuxcnc-dev.tar linuxcnc-dev then copy linuxcnc-dev.tar to the stick |
|
tar xvf /path/to/emc-dev.tar |
|
tar xvf /path/to/linuxcnc-dev.tar |