2015-08-02 12:52:30 -04:00
|
|
|
|
# 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:
|
|
|
|
|
|
2015-08-10 20:17:30 -04:00
|
|
|
|
Add this command for every directory that you'd like to open:
|
2015-08-02 12:52:30 -04:00
|
|
|
|
```
|
|
|
|
|
cd NAME-OF-FILE-YOU'D-LIKE-TO-OPEN
|
|
|
|
|
```
|
|
|
|
|
|
2015-08-02 12:54:42 -04:00
|
|
|
|
Create a new branch:
|
2015-08-02 12:52:30 -04:00
|
|
|
|
```
|
|
|
|
|
git checkout -b NAME-OF-BRANCH
|
|
|
|
|
```
|
|
|
|
|
|
2015-08-11 22:16:13 -04:00
|
|
|
|
Check if your image was correctly added to the directory:
|
2015-08-02 12:52:30 -04:00
|
|
|
|
```
|
|
|
|
|
ls
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
You should see the name of the image in the list shown.
|
|
|
|
|
|
2015-08-11 22:18:20 -04:00
|
|
|
|
Move up the hierarchy through directories:
|
2015-08-02 12:52:30 -04:00
|
|
|
|
```
|
|
|
|
|
cd ../
|
|
|
|
|
```
|
|
|
|
|
|
2015-08-02 12:54:42 -04:00
|
|
|
|
Check the status and you should see your image’s name in red:
|
2015-08-02 12:52:30 -04:00
|
|
|
|
```
|
|
|
|
|
git status
|
|
|
|
|
```
|
|
|
|
|
|
2015-08-02 12:54:42 -04:00
|
|
|
|
Add your changes:
|
2015-08-02 12:52:30 -04:00
|
|
|
|
```
|
|
|
|
|
git add NAME-OF-YOUR-IMAGE
|
|
|
|
|
```
|
|
|
|
|
|
2015-08-02 12:54:42 -04:00
|
|
|
|
Check the status and you should see your image’s name in green:
|
2015-08-02 12:52:30 -04:00
|
|
|
|
```
|
|
|
|
|
git status
|
|
|
|
|
```
|
|
|
|
|
|
2015-08-02 12:54:42 -04:00
|
|
|
|
Add the commit:
|
2015-08-02 12:52:30 -04:00
|
|
|
|
```
|
|
|
|
|
git commit -m “DESCRIBE COMMIT IN A FEW WORDS”
|
|
|
|
|
```
|
|
|
|
|
|
2015-08-03 18:36:26 -04:00
|
|
|
|
Now you can push (send) your changes (in the branch NAME-OF-BRANCH) to GitLab (the git remote named 'origin'):
|
2015-08-02 12:52:30 -04:00
|
|
|
|
```
|
|
|
|
|
git push origin NAME-OF-BRANCH
|
|
|
|
|
```
|
|
|
|
|
|
2015-08-07 01:40:38 -04:00
|
|
|
|
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.
|