Skip to content
peterdietz edited this page Jan 13, 2012 · 7 revisions

#Getting Started with DSpace + Git

Clone the repository. (The git repo is ~65MB)

git clone git://github.com/DSpace/DSpace.git

Go to the project space.

cd DSpace

Thus far, you are checked out to the branch "master", which is equivalent to "trunk" in SVN. Active development happens on "master", so use master if you are a developer who is intending on actively contributing to the main line of development. Otherwise, if you are intending to build a repository, you'll want to do that against a tagged release of DSpace, such as dspace-1.8.1, or the release branch to get bug fixes as they come out, such as dspace-1_8_x. You can switch to a specific branch or tag by typing.

git checkout dspace-1_8_x

From there, the standard DSpace build instructions follows.

mvn package
cd dspace/target/dspace-<version>-build.dir
ant update
/etc/init.d/tomcat6 restart

Note: If the build process complains about a missing directory like: dspace/module/jspui/src/main/webapp then you'll have to create those directories. See the fix missing directories when compiling.

Quick Primer on Using Git

Checking the status of your tree.

git status

Looking at the difference of your work in progress.

git diff

Commit your changes to your local tree.

git commit NameOfFileToCommit.java

Update your tree to get all the changes pushed to this central Git Repository

git pull

If you would like to update your local checkout, for instance before sending a pull request for your local changes, git rebase is the tool you will use, e.g.

git rebase master

At this point, if you have any conflicts between your local changes and the latest changes on GitHub, git will prompt you to resolve these conflicts.

Note: DSpace Developers currently only commit to SVN. This Git repository is a clone of that repository, and one-way synchronizes itself from SVN once-per-day. If the DSpace Developers change the workflow of code commits to use Git/GitHub, then changes will be made directly to this repository either through direct commits / pushes by authorized developers, or a preferred method will be to submit a Pull Request. If you would like to develop on DSpace for your local needs, you are encouraged to fork this repository, and commit your changes to your personal/organizational repository. So for now, do not try to do git push when checked out to this repository.

If you have any questions contact the DSpace community either on IRC, or on the dspace-devel mailing list.

Clone this wiki locally