Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The sources of the Groovy project are hosted on Codehaus Git infrastructure.

...

Github: https://github.com/groovy/groovy-core 

Additionally, the sources are mirrored on Codehaus' own Git infrastructure as well: http://git.codehaus.org/gitweb.cgi?p=groovy-git.git

...

You can learn about the repository details on the Xircles Codehaus admin interface: http://xircles.codehaus.org/projects/groovy/repo/git/repo

Additionally, the sources are mirrored on GitHub: https://github.com/groovy/groovy-core
If you're interested in contributing, you can send us GitHub pull requests, or submit patches through JIRA. Please see our contribution page for more.

...

If you want to checkout the source code of Groovy, there are two three different URLs you can use:

...

.

...

From the command-line, if you 're a Groovy developer, you can use the command:

Code Block
// anonymous access
git clone sshgit://git@gitgithub.codehaus.orgcom/groovy/groovy-gitcore.git

Or for anonymous access:

Code Block
 
// read/write access
git clone githttps://gitusername@github.codehaus.orgcom/groovy/groovy-core.git

git clone git@github.git
com:groovy/groovy-core.git


You can checkout different branches, in particular:

...

For fetching a branch the first time, simply use:

Code Block

git fetch origin

To checkout a particular branch:

Code Block

git checkout master
git checkout GROOVY_1_8_X
git checkout GROOVY_1_7_X
Info

Developers: Make sure your SSH information is up-to-date in on Github or on Codehaus Xircles and that your SSH key is available to your command-line client or IDE integration.
Please also make sure that you configured your email and name properly, by issueing the following commands:

Code Block

git config --global user.name "Firstname Lastname"
git config --global user.email "your_email@youremail.com"

Committing your changes (developers)

Use the commit command to commit your changes locally:

Code Block

git commit -m "Your commit message"

...

Say you have committed your changes on master and want to merge a particular comming on GROOVY_1_8_X, you can procede as follows:

Code Block

git checkout master
git commit -m "Fixed GROOVY-1234"
// this would return a12bc3... as commit number

git checkout GROOVY_1_8_X
git cherry-pick a12bc3

...

To see what's the status of your source tree, you can call:

Code Block

git status

And if you want to see all the latest commits that you have locally, you can do:

Code Block

git log

To retrieve the changes that have been pushed to the server, you can do:

Code Block

git pull

Of more explicitely:

Code Block

git pull origin master

Pushing your changes upstream

The various commits you've made are done locally, now is the time to share them with the world by pushing your changes to your Github clone, or to a publicly available Git repository:

Code Block

git push
git push origin master

If you're a Groovy despot, you can also push your changes to githubCodehaus for manual synchronization purpose. But for that, first, you'll have to have configured an additional remote with:

Code Block

git remote add githubcodehaus git@github.comssh:groovy//git@git.codehaus.org/groovy-coregit.git

Then you can push the changes back to GitHub as well:

Code Block

git push githubcodehaus master

Pushing a local branch to the remote repository

To push a local branch to the Codehaus Git repository or on the GitHub mirror, you can do the following:

Code Block

git push origin myLocalBranch
git push githubcodehaus myLocalBranch

git push myRemoteLocation myLocalBranch

Merging pull requests from GitHub

Contributors might bring their contributions in the form of "pull requests" on our GitHub mirror.
Groovy despots can merge the pull requests on GitHub through the web interface by following this proposed workflow:

Code Block

// create a new branch to test the pull request
git checkout -b test_foopatch_onto_1_8
// now you are on branch test_foopatch_onto_1_8
// let's add the git branch of the contributor as a remote
git remote add someperson git://github.com/groovy/somepersonsrepo.git
// fetch the particular commits
git fetch someperson the_branch_with_the_changes
// merge it in our test branch
git merge FETCH_HEAD
// test the changes
gradle test or gradle test
// if all tests pass, then we can safely use the web based merge UI of Github

...