Skip to content
Snippets Groups Projects
Commit ff43d971 authored by Mark HOEBEKE's avatar Mark HOEBEKE
Browse files

Reorganized sections

parent 0f950e92
No related branches found
No related tags found
1 merge request!4Finished first version of git-remote content.
Showing
with 12 additions and 39 deletions
......@@ -12,7 +12,7 @@ Training material for the Git for Beginners ABiMS training session
### Trainee Setup Testing
1. Does everyone have an account on GitLab ?
### Git Basics
### Git(Lab) Basics
1. Some definitions
1. Creating a repository
1. Adding / editing / removing files & folders
......@@ -20,7 +20,12 @@ Training material for the Git for Beginners ABiMS training session
### Using Remote Repositories
1. Motivation
1. Cloning a repository
1. Cloning a GitLab repository
1. Cloning using HTTPS
1. CLoning using SSH
### Git Command Line Basics
1. Displaying information about a local repository
1. Making changes to the local repository
1. Propagating changes to the remote repository
......
......@@ -8,13 +8,6 @@ This is also handy when you work on several different machines (your personal la
A more advanced usage is to work on several local copies of a remote repository simultaneously. Ex.: You are working on a new feature of your program (or a new chapter of your book), but you need to fix a bug in the current release of the same program (or you want to fix typos and other minor mistakes in another chapter). Git makes it easy to have two (or any number of) *distinct* copies of the same repository on your machine in completely separate folders, and allows you to make modifications in isolation before propagating your work back to the same remote repository.
## Git from the command line interface (CLI)
From now on, we will mostly use the Git CLI interface, available for Linux, MacOS and Windows. These operating systems also provide graphical user interfaces allowing to use Git without typing actual commands, but we have no time in this session to cover these.
On the CLI, all Git commands start with `git` followed by a keyword matching a git operation (`clone`, `add` , `rm`, `branch`) and a set of arguments and options specific to each operation.
## Cloning a Repository
Copying a remote repository is called *cloning*. In order to be able to clone a repository, you need its address (URL). For non-public repositories you may also need credentials (login/password, SSH key or other).
......@@ -23,7 +16,8 @@ The actual URL(s) for a GitLab hosted project can be found by clicking the `Clon
![clone_button.png](./media/clone_button.png)
### Cloning using HTTPS
## Cloning using HTTPS
The complete command to clone a repository from GitLab using HTTPS looks like:
......@@ -41,7 +35,7 @@ The command may ask you for your GitLab username and your password.
- The benefit of using HTTPS is that no further setup is needed on your workstation.
- The drawback is that unless you use advanced (and insecure) git commands to store your username and password, you will need to enter them every time you communicate with the remote repository.
### Cloning using SSH
## Cloning using SSH
Using SSH to interact with the repository required you to copy an SSH key file to GitLab. If you have no such key, you will have to generate it.
......@@ -66,12 +60,3 @@ This contents has to be copied to the GitLab SSH Key management page, accessible
The SSH private key must be present in the correct location on each machine (laptop, workstation) that will be used to access the GitLab repository. It is recommended to generate a key pair on each machine and to add each public key to GitLab. It avoids having multiple copies of a private key, and also allows to track which machine was used to access the repository.
......@@ -26,13 +26,13 @@ Git provides operations to specify which files should be part of a commit.
## Create Your First Repository
### [Log In to GitLab](/git-basics/media/gitlab-login.mp4)
### [Log In to GitLab](./media/gitlab-login.mp4)
Log in to GitLab using your favourite account settings (GitLab, Google, GitHub, Twitter...)
![./media/gitlab_login.png](./media/gitlab_login.png)
### [Create a new Project](/git-basics/media/gitlab-create-project.mp4)
### [Create a new Project](./media/gitlab-create-project.mp4)
1. Select **Create a Project**
1. Select **Create Blank Project**
......@@ -120,20 +120,3 @@ Using the `Create commit...` allow to tune how modifications will be propagated
Take some time to complete [the exercises](./exercises.md)
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment