5.2. IDE workflow¶
This section introduces you to using Git from within the Eclipse IDE.
There are 3 training repositories available, set up so that they can mimic our development workflow.
- Each repository contains multiple projects.
- Each repository has branches called
master,8.16,8.14 - The contents themselves are minimal, just a few files.
- The repositories and their contents are:
workflow.git.master workflow.master.feature workflow.a.git workflow.a.group.feature workflow.a.plugin1 workflow.a.plugin2 workflow.b.git workflow.b.group.feature workflow.b.plugin3 workflow.b.plugin4
Confirm that you have access to the training repositories
$ ssh dascgitolite@dasc-git.diamond.ac.uk info # issue command exactly as it appears, don't change the userid
# if you are prompted for a password, there is an error in the setup
@C @R W training/${USER}/workflow\..* # you can create and update the training repositories for your userid
@R_ training/template/workflow\..* # you can read the training repository templates
5.2.1. Copy the training repositories¶
First make a copy, on the remote Git server, of the remote training repositories, using this command line script (download):
work_dir=/scratch/training_temp/
rm -rf ${work_dir}
mkdir ${work_dir}
for repository in "a" "b" "master"; do
cd ${work_dir}
git clone dascgitolite@dasc-git.diamond.ac.uk:training/template/workflow.${repository}.git
cd workflow.${repository}
git remote set-url origin dascgitolite@dasc-git.diamond.ac.uk:training/${USER}/workflow.${repository}.git
for branch in "8.14" "8.16" "master"; do
git checkout ${branch}
git push origin ${branch}:refs/heads/${branch} --verbose # (re-)create our private remote
done
done
rm -rf ${work_dir} # having created a remote copy of the remote repositories, delete the temporary copy
If you have previously copied the repositories, and wish to re-initialise them, simply run the above script again.
5.2.2. Check out the training repositories¶
Start your Eclipse IDE, pointing to a new workspace.
- At , de-select
Build automatically - Open the console view at
- Open the Git Repositories and Git Staging views.
- Open Buckminster CQuery
https://alfred.diamond.ac.uk/buckminster/base/training-trunk.cquery - On the Main tab, specify a component name of
workflow.master.featureand a component type ofeclipse.feature - On the Properties tab, change
training.repository.userto your FedID - Resolve and Materialize, then enjoy!
Git repositories are cloned outside the workspace, in a directory called ${workspace_loc}_git, and imported into your workspace as existing projects.
Other possible checkout options:
- For the
training/workflow.smallrepository, specify a component name ofworkflow.small(and leave component type unspecified). - For the IDE training repositories v8.16, specify CQuery
https://alfred.diamond.ac.uk/buckminster/base/training-v8.16.cquery
5.2.2.1. Didn’t work?¶
Did you:
Issue the
ssh dascgitolite@dasc-git.diamond.ac.uk info command to check your access?Create the remote copy of the training repositories?
Set the
training.repository.user property?Once you have fixed the problem, you need to:
Delete the
${workspace_loc}_git directoryRestart Eclipse
5.2.3. Use EGit¶
more to come