summaryrefslogtreecommitdiff
path: root/doc/gitlab-basics/add-image.md
blob: 17c210c43e0899ef8131e6a402a7fbccb0505f14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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
# How to add an image

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.

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:

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

Check if your image is actually present in the directory (if you are in Windows,
use `dir` instead):

```
ls
```

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

Check the status:

```
git status
```

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

```
git add NAME-OF-YOUR-IMAGE
```

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

```
git status
```

Commit:

```
git commit -m "DESCRIBE COMMIT IN A FEW WORDS"
```

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

```
git push origin NAME-OF-BRANCH
```

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