readme.md 4.31 KB
Newer Older
Overbeeke, Lennert van's avatar
Overbeeke, Lennert van committed
1
2
# git-started
Basic steps for Git. Click on the numbered chapter names above to navigate the contents.
Overbeeke, Lennert van's avatar
Overbeeke, Lennert van committed
3
4

## Purpose
5
To help teams at WFSR control their projects using Git.
Overbeeke, Lennert van's avatar
Overbeeke, Lennert van committed
6
7
8
9
10
11
The easy steps in this short course will teach you how to:
- start your project
- structure your project
- share your project
- successfully complete your project

12
13
14
15
Just read the instructions in the ```readme.md``` files of each chapter folder.
If you have any questions, [create an issue](https://git.wur.nl/overb015/git-started/issues/new)
or e-mail me at [lennert.vanoverbeeke@wur.nl](lennert.vanoverbeeke@wur.nl).

16
## Definitions
Overbeeke, Lennert van's avatar
Overbeeke, Lennert van committed
17
18
19
20
21
22
- **Git** is software for version control of your documents and data
  - Each addition and modification is tracked
  - Each step is reversible; overwritten work is not lost
  - Co-write a document simultaneously in two branches
  - Git functionalities will be introduced step by step
  - Git also works without GitLab
Overbeeke, Lennert van's avatar
Overbeeke, Lennert van committed
23
  - Install Git for Windows [here](https://git-scm.com/downloads).
Overbeeke, Lennert van's avatar
Overbeeke, Lennert van committed
24
25
26
27
28
29
30
- **GitLab** is the online workspace that makes Git easier
  - Has many, many extra functions outside of Git
  - Backed up at WUR, just like the W:/ drive
  - Look through your project's files like a file browser
  - Easily compare versions or look up an old version
  - Manage contributions from the team
  - Manage time planning using Milestones and Issues
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
- **Project** is a GitLab concept, meaning the full package of all your files,
  project members, planning, issues etc.
  The project exists only on [git.wur.nl](git.wur.nl), where you'll go to to use these functionalities.
  The GitLab project represents
  - the project folder on the W:/ drive
  - and the history of all the files in that folder
  - and the planning, actions and deadlines for team members
  - and the framework for documenting and reporting.
-  **Repository**, abbreviated to **repo**, is the part of your project that contains the files.
  The repo represents **only** the project folder on the W:/ drive.
  The repo is what you can download to your own computer to work on.
  The repo is what the Git software interacts with.
  Git does not work with the other functionalities in GitLab, just the files.
  - A **commit** is a set of changes made to the repo.
    Any edit, addition, deletion, of moving of a file is one change.
    You can add any number of changes to any number of files to a single commit,
    but the result of the commit should affect only one, single, aspect of the project.
    If you want to add file A and fix file B, make two separate commits.
    If you want to make two separate changes to file B, that could be one commit.
    You can view the repo as a folder that started out empty,
    and was built up to the current status by a applying the list of commits in the right order.
  - You give each commit a short **commit message** to describe what was changed by it.
    This message should fit in 50 characters.
    If you need more space to sum up your changes, write a longer message this time,
    but make sure to commit smaller sets of changes next time.
  - The **remote** is the central version of the repo, stored on the WUR infrastructure.
    This version is the "official" state of the repo, or the consensus.
  - A **clone** is a copy of the repo on your own computer.
    Your repo is identical to the **remote** on GitLab at the moment you clone it,
    but as you make changes to your local copy, or team members make changes to the remote,
    your versions will start to have differences.
    Git provides the tools we need to manage these differences.
  - When you've made changes on your local copy that you want to add to the remote,
    you **push** your commit to the remote.
    Team members can then **pull** these changes to their local copy to stay updated.
Overbeeke, Lennert van's avatar
Overbeeke, Lennert van committed
66
67
- **Markdown** is a simple formatting language for plain text
  - File extension: ```.md```
68
  - Used for ```readme.md``` files such as this one to provide a
Overbeeke, Lennert van's avatar
Overbeeke, Lennert van committed
69
70
71
72
    summary of the contents of a folder
  - The formatting is contained in the text, allowing the use of
    line-by-line version control to manage formatting
  - Supports math formulas like $`f(x) = log_{10} (y)`$
73
  - Different levels of titles are formatted like this:
Overbeeke, Lennert van's avatar
Overbeeke, Lennert van committed
74
75
    ```
    # Top level title
76
77
    ## Mid level title
    ### Low level title
Overbeeke, Lennert van's avatar
Overbeeke, Lennert van committed
78
79
80
81
82
    Normal text.
    ```
    Which looks like this:

# Top level title
83
84
## Mid level title
### Low level title
Overbeeke, Lennert van's avatar
Overbeeke, Lennert van committed
85
Normal text.