The process of creating a repository is the same whether you're an existing committer or not.

+

+

=== Tracking only your own changes ===

+

If you're only interested in your own changes and/or don't care about importing existing commit history from a legacy repository, you can just tell git to start tracking changes in a specific directory tree.

+

To turn any directory into a versioned repository with the sequence: <code> git init; git add . ; git commit ; </code> Git will then start tracking changes from this point onwards.

+

+

+

=== Migrating from CVS ===

+

+

To import and track changes from an Eclipse CVS server, for example, you would do something like the following:

This commands says: import the org.eclipse.core.resources module into a git repository in the directory eclipse-core-resources. The <code>-r</code> switch says to store the loaded repository data under the 'cvs' remote. A remote is like a git branch except you _never_ checkout a remote directly. You'll create your own branches based on remote versions. The remotes must be kept clean so that when you next run cvsimport, or pull changes from others, they apply cleanly.

+

+

With that one command you now have a fully-fledged repository waiting for you.

+

+

<code>

+

cd eclipse-core-resources

+

git branch -a

+

git log

+

</code>

+

+

<code> branch -a</code> will show all the branches. You'll see that you're currently sitting in <code>master</code> which has been automatically created as a clone of cvs/master. git log shows you the most recent commits into the cvs repository. You'll also see that cvs/* has all the upstream branches (which is a lot!).

+

+

=== Staying fresh ===

+

+

When you next want to update sync your repository, run the git cvsimport command again. You might want to pass the _-i_ switch to cvsimport. This prevents git from automatically merging changes from HEAD into your master branch which you may want to do if you have uncommitted local changes.

+

+

You can see changes made in a remote with git log <remote_name>/<branch_name>.

+

+

Examples: Some scripts which track Eclipse & e4 core.resources and CDT take a look at

+

http://github.com/jamesblackburn/misc/tree/master/scripts/eclipse-sync driven by the sync.sh script

+

This cvsimports the projects from the Eclipse repository and pushes selected branhces (HEAD and 3_4) to github.

Importing a repo

The process of creating a repository is the same whether you're an existing committer or not.

Tracking only your own changes

If you're only interested in your own changes and/or don't care about importing existing commit history from a legacy repository, you can just tell git to start tracking changes in a specific directory tree.
To turn any directory into a versioned repository with the sequence: git init; git add . ; git commit ; Git will then start tracking changes from this point onwards.

Migrating from CVS

To import and track changes from an Eclipse CVS server, for example, you would do something like the following:

This commands says: import the org.eclipse.core.resources module into a git repository in the directory eclipse-core-resources. The -r switch says to store the loaded repository data under the 'cvs' remote. A remote is like a git branch except you _never_ checkout a remote directly. You'll create your own branches based on remote versions. The remotes must be kept clean so that when you next run cvsimport, or pull changes from others, they apply cleanly.

With that one command you now have a fully-fledged repository waiting for you.

cd eclipse-core-resources
git branch -a
git log

branch -a will show all the branches. You'll see that you're currently sitting in master which has been automatically created as a clone of cvs/master. git log shows you the most recent commits into the cvs repository. You'll also see that cvs/* has all the upstream branches (which is a lot!).

Staying fresh

When you next want to update sync your repository, run the git cvsimport command again. You might want to pass the _-i_ switch to cvsimport. This prevents git from automatically merging changes from HEAD into your master branch which you may want to do if you have uncommitted local changes.

You can see changes made in a remote with git log <remote_name>/<branch_name>.

Initially pulling from CVS into a repo puts HEAVY load on the Eclipse CVS server ... better clone an existing git repo if available (Can be used as a a form of a torrent, it is possible to pull from someone else I know, and sync with eclipse servers, they're all the same repositories after all)

Using the EGit integration

Contributing to EGit

If you want to get involved with EGit, please see our Google Code project site:

Known open issues are listed here, along with the clone URL for the Git
repository containing the project's code. Loading it into Eclipse is as simple
as importing the existing projects from the checked-out repository. Please see
SUBMITTING_PATCHES in the top level directory for information on how to send
contributions in.