BigW Consortium Gitlab

add-image.md 1.15 KB
Newer Older
1 2
# How to add an image

3 4 5
Using your standard tool for copying files (e.g. Finder in Mac OS, or Explorer
in Windows, or...), put the image file into the GitLab project. You can find the
project as a regular folder in your files.
6

7 8 9
Go to your [shell](command-line-commands.md), and move into the folder of your
Gitlab project. This usually means running the following command until you get
to the desired destination:
10 11

```
12
cd NAME-OF-FOLDER-YOU'D-LIKE-TO-OPEN
13 14
```

15 16
Check if your image is actually present in the directory (if you are in Windows,
use `dir` instead):
17 18 19 20 21 22 23

```
ls
```

You should see the name of the image in the list shown.

24
Check the status:
25 26 27 28 29

```
git status
```

30 31 32
Your image's name should appear in red, so `git` took notice of it! Now add it
to the repository:

33 34 35 36
```
git add NAME-OF-YOUR-IMAGE
```

37 38
Check the status again, your image's name should have turned green:

39 40 41 42
```
git status
```

43 44
Commit:

45
```
46
git commit -m "DESCRIBE COMMIT IN A FEW WORDS"
47 48
```

49 50 51
Now you can push (send) your changes (in the branch NAME-OF-BRANCH) to GitLab
(the git remote named 'origin'):

52 53 54 55
```
git push origin NAME-OF-BRANCH
```

56
Your image will be added to your branch in your repository in GitLab.