|
|
# 1 First steps
|
|
|
Go to https://webis16.medien.uni-weimar.de/gitlab and log in with your university account if you haven't done so already. This is the same username and password that you have been using for our CVS. On your first login, your gitlab account will be created automatically.
|
|
|
|
|
|
You may not be able to see any projects yet, because you need to be granted access by one of our staff; if you have registered your account some time ago and still can't access any projects, please notify the webisstud mailing list.
|
|
|
You may not be able to see any projects yet, because you need to be granted access by one of our staff; if you have registered your account some time ago and still can't access any projects, please notify the `webisstud` mailing list.
|
|
|
|
|
|
|
|
|
# 2 Exploring Gitlab
|
|
|
# 2 Exploring GitLab
|
|
|
Once you have access, you will see our projects at https://webis16.medien.uni-weimar.de/gitlab/explore/projects/
|
|
|
|
|
|
The projects are organized in mostly the same way that they were in CVS. Top-level folders under 'code-in-progress' are now called 'groups' in Gitlab. For instance 'webisstud' is now a group with the URL [https://webis16.medien.uni-weimar.de/gitlab/webisstud]. You can see a list of all groups here https://webis16.medien.uni-weimar.de/gitlab/explore/groups
|
|
|
The projects are organized in mostly the same way that they were in CVS. Top-level folders under 'code-in-progress' are now called *groups* in GitLab. For instance `webisstud` is now a group with the URL https://webis16.medien.uni-weimar.de/gitlab/webisstud.
|
|
|
|
|
|
Each former CVS module on the second level of the hierarchy is now 'project' in Gitlab, and has its own git repository. For example, the project 'code-in-progress/webisstud/wstud-clickbait-ws16' is now project 'wstud-clickbait-ws16' in group 'webisstud' with the URL https://webis16.medien.uni-weimar.de/gitlab/webisstud/wstud-clickbait-ws16
|
|
|
You can see a list of all groups here https://webis16.medien.uni-weimar.de/gitlab/explore/groups
|
|
|
|
|
|
Each former CVS module on the second level of the hierarchy is now 'project' in Gitlab, and has its own git repository. For example, the project `code-in-progress/webisstud/wstud-clickbait-ws16` is now project `wstud-clickbait-ws16` in group `webisstud` with the URL https://webis16.medien.uni-weimar.de/gitlab/webisstud/wstud-clickbait-ws16
|
|
|
|
|
|
|
|
|
# 3 Authentication And Cloning Projects
|
... | ... | @@ -29,41 +31,49 @@ If you need further instructions on working with git from the command line, you |
|
|
* [Git Tutorial](https://try.github.io/levels/1/challenges/1)
|
|
|
|
|
|
|
|
|
# 4 Working with the 'webis' Command Line Tool
|
|
|
# 4 Working with the `webis` Command Line Tool
|
|
|
|
|
|
We provide a convenience command line tool called 'webis' to help you work with Gitlab. This will be installed on all of our lab machines; instructions for installation on your own machine will follow.
|
|
|
We provide a convenience command line tool called `webis` to help you work with Gitlab. This will be installed on all of our lab machines; instructions for installation on your own machine will follow.
|
|
|
|
|
|
If this tool is already installed on your lab machine, run 'webis git init' and follow the instructions to configure it. Following that, there are several ways to clone multiple projects from GitLab:
|
|
|
If this tool is already installed on your lab machine, run `webis git init` and follow the instructions to configure it. Following that, there are several ways to clone multiple projects from GitLab:
|
|
|
|
|
|
* clone all projects that you have currently checked out from CVS:
|
|
|
1. go to 'code-in-progress' in your CVS workspace directory
|
|
|
2. run 'webis git cvstree2git'
|
|
|
* clone all projects from one or more Gitlab groups:
|
|
|
2. run `webis git cvstree2git`
|
|
|
* clone all projects from one or more GitLab groups:
|
|
|
1. create a directory for your git workspace and switch to it
|
|
|
2. run 'webis git clone-groups' and select the project group(s) you want
|
|
|
2. run `webis git clone-groups` and select the project group(s) you want
|
|
|
3. after pressing return, all selected project groups will be cloned
|
|
|
|
|
|
You can then import all of the cloned projects into your IDE at once.
|
|
|
|
|
|
`webis git clone-groups` can also be used for keeping your cloned working copies up to date.
|
|
|
|
|
|
|
|
|
# 5 Working with Eclipse
|
|
|
To avoid confusion with existing CVS projects, start with a new Eclipse workspace, or remove existing code-in-progress projects before you begin.
|
|
|
To avoid confusion with existing CVS projects, start with a new Eclipse workspace, or remove existing `code-in-progress` projects before you begin.
|
|
|
|
|
|
|
|
|
## 5.1 Cloning Projects
|
|
|
You can clone individual projects directly from Eclipse using the following method:
|
|
|
|
|
|
1. from any Gitlab project page, copy the clone URL under the project name (next to 'SSH' or 'HTTPS')
|
|
|
2. In Eclipse, go to the 'Git Repositories' view (Window -> Show View)
|
|
|
3. right click the 'Git Repositories' view, and select 'paste repository path or URI'
|
|
|
4. in the following dialog, select the appropriate protocol and click 'next'
|
|
|
5. select the 'master' branch, then 'next', then the destination directory on your local machine, and click 'finish'
|
|
|
1. from any GitLab project page, copy the clone URL under the project name (next to 'SSH' or 'HTTPS')
|
|
|
2. In Eclipse, go to the *Git Repositories* view (*Window* -> *Show View*)
|
|
|
3. right click the *Git Repositories* view, and select *paste repository path or URI*
|
|
|
4. in the following dialog, select the appropriate protocol and click *Next*
|
|
|
5. select the `master` branch, then *Next*, then the destination directory on your local machine, and click *Finish*
|
|
|
|
|
|
## 5.2 Interacting with Git from Eclipse
|
|
|
Right click on any project in your workspace, select 'Team', and then 'pull' to download updates from Gitlab into your local repository. The 'Team' menu also provides options for committing your changes to your local repository and pushing your commits to Gitlab.
|
|
|
Right click on any project in your workspace, select *Team*, and then *Pull* to download updates from GitLab into your local repository. The *Team* menu also provides options for committing your changes to your local repository and pushing your commits to GitLab.
|
|
|
|
|
|
The *Git Repositories* view allows you to update all of your local repositories at once: click the view area, press `Ctrl-A`, then right-click and select *Pull*.
|
|
|
|
|
|
|
|
|
# 6 Working with IntelliJ IDEA
|
|
|
If you use IntelliJ IDEA, there is a slightly more convenient process with the *Gitlab Projects* plugin. Go to *Configure* -> *Plugins* -> *Browse Repositories* and install the plugin. Afterwards, there is a new option *GitLab* under *Check out from Version Control*.
|
|
|
|
|
|
The 'Git Repositories' view allows you to update all of your local repositories at once: click the view area, press Ctrl-A, then right-click and select 'pull'.
|
|
|
From there, go to *Settings* to configure the plugin, enter https://webis16.medien.uni-weimar.de/gitlab as URL.
|
|
|
|
|
|
The *Access Token* must be generated from your GitLab profile page at https://webis16.medien.uni-weimar.de/gitlab/profile/personal_access_tokens.
|
|
|
|
|
|
# 6 Working with Intellij
|
|
|
If you use Intellij, there is a slightly more convenient process with the 'Gitlab Projects' plugin. Go to Configure -> Plugins -> Browse Repositories and install the plugin. Afterwards, there is a new option "Gitlab" under "Check out from Version Control". From there, go to settings to configure the plugin -- enter https://webis16.medien.uni-weimar.de/gitlab as URL. The 'Access Token' must be generated from your Gitlab profile page at https://webis16.medien.uni-weimar.de/gitlab/profile/personal_access_tokens. After you click "Refresh", you will see our project groups, which you can expand to find and clone individual projects. |
|
|
\ No newline at end of file |
|
|
After you click *Refresh*, you will see our project groups, which you can expand to find and clone individual projects. |
|
|
\ No newline at end of file |