diff --git a/README.md b/README.md index 5b273bf0f8416a80d1156e42a9ea47251bad609c..097c8073934cb733234e38bbdc108d05a4007d4c 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/git-remote/README.md b/git-remote/README.md index d361601e690f871cb71383196221cb6a2d5287e5..70e1795cfbae73ccb18073174b9280dc5d2e58cb 100644 --- a/git-remote/README.md +++ b/git-remote/README.md @@ -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  -### 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. - - - - - - - - - diff --git a/git-basics/README.md b/gitlab-basics/README.md similarity index 97% rename from git-basics/README.md rename to gitlab-basics/README.md index 9d2b483478013c5798e60d475b11719943d6397f..89e8bf8a9b8b6cd0c3dd5bff49ffba0f164b89c4 100644 --- a/git-basics/README.md +++ b/gitlab-basics/README.md @@ -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...)  -### [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) - - - - - - - - - - - - - - - - - diff --git a/git-basics/exercises.md b/gitlab-basics/exercises.md similarity index 100% rename from git-basics/exercises.md rename to gitlab-basics/exercises.md diff --git a/git-basics/media/addition_icon.png b/gitlab-basics/media/addition_icon.png similarity index 100% rename from git-basics/media/addition_icon.png rename to gitlab-basics/media/addition_icon.png diff --git a/git-basics/media/commit_button.png b/gitlab-basics/media/commit_button.png similarity index 100% rename from git-basics/media/commit_button.png rename to gitlab-basics/media/commit_button.png diff --git a/git-basics/media/current_files.png b/gitlab-basics/media/current_files.png similarity index 100% rename from git-basics/media/current_files.png rename to gitlab-basics/media/current_files.png diff --git a/git-basics/media/edit_icons.png b/gitlab-basics/media/edit_icons.png similarity index 100% rename from git-basics/media/edit_icons.png rename to gitlab-basics/media/edit_icons.png diff --git a/git-basics/media/gitlab-create-project.mp4 b/gitlab-basics/media/gitlab-create-project.mp4 similarity index 100% rename from git-basics/media/gitlab-create-project.mp4 rename to gitlab-basics/media/gitlab-create-project.mp4 diff --git a/git-basics/media/gitlab-login.mp4 b/gitlab-basics/media/gitlab-login.mp4 similarity index 100% rename from git-basics/media/gitlab-login.mp4 rename to gitlab-basics/media/gitlab-login.mp4 diff --git a/git-basics/media/gitlab_create_project.png b/gitlab-basics/media/gitlab_create_project.png similarity index 100% rename from git-basics/media/gitlab_create_project.png rename to gitlab-basics/media/gitlab_create_project.png diff --git a/git-basics/media/gitlab_current.png b/gitlab-basics/media/gitlab_current.png similarity index 100% rename from git-basics/media/gitlab_current.png rename to gitlab-basics/media/gitlab_current.png diff --git a/git-basics/media/gitlab_login.png b/gitlab-basics/media/gitlab_login.png similarity index 100% rename from git-basics/media/gitlab_login.png rename to gitlab-basics/media/gitlab_login.png diff --git a/git-basics/media/gitlab_project_info.png b/gitlab-basics/media/gitlab_project_info.png similarity index 100% rename from git-basics/media/gitlab_project_info.png rename to gitlab-basics/media/gitlab_project_info.png diff --git a/git-basics/media/modification_icon.png b/gitlab-basics/media/modification_icon.png similarity index 100% rename from git-basics/media/modification_icon.png rename to gitlab-basics/media/modification_icon.png