Commit dae6da66 authored by Michael Wimmer's avatar Michael Wimmer
Browse files

update to use gitlab

parent 02893925
......@@ -247,16 +247,29 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## GitHub is a web-based Git repository hosting service\n",
"## What to use as the central authority\n",
"\n",
"\n",
"### Very popular: GitHub is a web-based Git repository hosting service\n",
"<img src=\"img/GitHub.jpg\" width=200 />\n",
"\n",
"* www.github.com\n",
"* Web hosting \n",
"* Free-private repositories for academic users \n",
"* Conventient tools \n",
" * Diff viewer\n",
" * Commit browser \n",
" * etc\n",
" \n"
"\n",
"### For internal TU Delft projects: TUDelft Gitlab\n",
"\n",
"* https://gitlab.tudelft.nl\n",
"* Open source alternative to github\n",
"* Similar functionality as github\n",
"\n",
"### For this course: our private Gitlab\n",
"\n",
"* https://gitlab.kwant-project.org\n"
]
},
{
......@@ -265,7 +278,7 @@
"source": [
"## Excercise 2: Basic single user git \n",
"\n",
"* Setting up a new git repository using github + clone \n",
"* Setting up a new git repository using gitlab + clone \n",
"* A basic single user workflow involving: commiting, pulling and pushing your changes \n"
]
},
......@@ -274,13 +287,11 @@
"metadata": {},
"source": [
"## 2A setting up a project\n",
"* Create new repository on github. \n",
" * Go to GitHub and log in \n",
" * Click create a new repository \n",
" * Name it : \"Casimir-programming\"\n",
" * Add `readme.md`\n",
" * add [`.gitignore`](https://git-scm.com/docs/gitignore)\n",
" * add a license (e.g., MIT) (optional) "
"* Create new repository on https://gitlab.kwant-project.org/. \n",
" * Go to Gitlab and log in \n",
" * Click \"New Project\"\n",
" * Name it, e.g. \"crash course\"\n",
" * Check \"Initialize repository with a README\""
]
},
{
......@@ -290,7 +301,7 @@
"* set up [ssh key](https://help.github.com/articles/generating-an-ssh-key/) to access your repository without entering a password\n",
" * In terminal type `ssh-keygen` and use the default key name (optionally choose a passphrase—recommended outside of this course)\n",
" * This bit is to avoid troubles windows users have with copying text from terminal. Copy the **public** key to your home directory: `cp ~/.ssh/id_rsa.pub ~`\n",
" * In the jupyter file browser open this file and copy all of its contents to a new key at https://github.com/settings/keys"
" * In the jupyter file browser open this file and copy all of its contents to a new key at https://gitlab.kwant-project.org/profile/keys"
]
},
{
......@@ -298,8 +309,8 @@
"metadata": {},
"source": [
"* **[clone](https://git-scm.com/docs/git-clone)** the repository in day3\n",
" * Open a terminal and navigate to the \"day3\" directory\n",
" * type: ``git clone <url_of_your_repository>`` (you can get the location using \"clone or download\" button)\n",
" * Open a terminal and navigate to the \"day2_afternoon\" directory\n",
" * type: ``git clone <url_of_your_repository>`` (you can get the location using the \"Clone\" button, use the \"Clone with SSH\" link after you set up the SSH keys.)\n",
" * Cloning will create a copy of the entire repository in a new folder"
]
},
......@@ -336,9 +347,9 @@
" * Click browse files to browse your code at the time of the commit. \n",
" * Go to Graphs/network, this shows you a line with all comits. \n",
" * Very useful once we move on to multi-user workflows. \n",
" * Open a file and check out [history](https://help.github.com/articles/differences-between-commit-views/)\n",
" * Open a file and check out [history](https://docs.gitlab.com/ee/user/project/repository/git_history.html)\n",
" * this shows a list of all commits that changed that specific file. \n",
" * Open a file and look at [blame](https://github.com/blog/228-playing-the-blame-game)\n",
" * Open a file and look at [blame](https://docs.gitlab.com/ee/user/project/repository/git_blame.html)\n",
" \n",
" "
]
......@@ -395,8 +406,8 @@
"### Find yourself a partner (ask person next to you) \n",
"### Add your partner as a collaborator \n",
"* Go to the repository of person A on github. \n",
"* Go to settings/collaborators. Enter the GitHub ID of person Band make them a collaborator (write access). \n",
"* Person B clones the repository of person A (look at exercise 1a if you forgot) \n",
"* Go to settings/members. Enter the Gitlab ID of person B and make them a collaborator (write access). \n",
"* Person B clones the repository of person A (look at exercise 2a if you forgot) \n",
"\n",
"### Creating and resolving a conflict \n",
"* Both persons will add a docstring (with the triple quotes) to the function that calculates the surface of the circle\n",
......@@ -431,7 +442,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.3"
"version": "3.7.4"
}
},
"nbformat": 4,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment