Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
5d8e9bd5
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5d8e9bd5
编写于
1月 26, 2017
作者:
A
Achilleas Pipinellis
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'polettix/gitlab-ce-master' into 'master'
Simplify wording in "adding an image" docs See merge request !8819
上级
41674d68
1758dcb6
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
22 addition
and
28 deletion
+22
-28
doc/gitlab-basics/add-image.md
doc/gitlab-basics/add-image.md
+22
-28
未找到文件。
doc/gitlab-basics/add-image.md
浏览文件 @
5d8e9bd5
# How to add an image
The following are the steps to add images to your repository in
GitLab:
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.
Find the image that you’d like to add.
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:
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-F
ILE
-YOU'D-LIKE-TO-OPEN
cd NAME-OF-F
OLDER
-YOU'D-LIKE-TO-OPEN
```
Create a new branch:
```
git checkout -b NAME-OF-BRANCH
```
Check if your image is actually present in the directory (if you are in Windows,
use
`dir`
instead):
Check if your image was correctly added to the directory:
```
ls
```
You should see the name of the image in the list shown.
Move up the hierarchy through directories:
```
cd ../
```
Check the status:
Check the status and you should see your image’s name in red:
```
git status
```
Add your changes:
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 and you should see your image’s name in green:
Check the status again, your image's name should have turned green:
```
git status
```
Add the commit:
Commit:
```
git commit -m
“DESCRIBE COMMIT IN A FEW WORDS”
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'):
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.
Your image will be added to your branch in your repository in GitLab.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录