summaryrefslogtreecommitdiff
path: root/doc/gitlab-basics/add-image.md
blob: e574c0ec7e9a8471adb4c8a5b660602ed234d382 (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
57
58
59
60
61
62
# How to add an image

The following are the steps to add images to your repository in
GitLab:

Find the image that you’d like to add.

In your computer files, find the GitLab project to which you'd like to add the image
(you'll find it as a regular file). Click on every file until you find exactly where you'd
like to add the image. There, paste the image.

Go to your [shell](command-line-commands.md), and add the following commands:

Add this command for every directory that you'd like to open:
```
cd NAME-OF-FILE-YOU'D-LIKE-TO-OPEN
```

Create a new branch:
```
git checkout -b NAME-OF-BRANCH
```

Check if your image was correctly added to the file:
```
ls
```

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

Go back one file:
```
cd ../
```

Check the status and you should see your image’s name in red:
```
git status
```

Add your changes:
```
git add NAME-OF-YOUR-IMAGE
```

Check the status and you should see your image’s name in green:
```
git status
```

Add the 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. Create a [Merge Request](add-merge-request.md)
to integrate your changes to your project.