- 求职 : Linux运维
- 论坛徽章:
- 10
|
本帖最后由 夏寥寥 于 2018-09-13 10:42 编辑
Hi:
大家好!请教个问题,麻烦大家帮忙解答一下~不甚感激!
我编写了一个脚本deploy.sh。就是使用git pull从gitlab上向本机拉取代码。但是通过git pull拉取代码时,经常会出现冲突的情况。这时我就需要手动输入:wq!来保存。
我现在想在脚本中自动进行保存,该怎么做呢?多谢大家!
脚本内容:
- more deploy.sh
- cd /home/work/front/web
- git pull #拉取代码,但有时会提示手动保存,该怎么处理
- bin/bash /root/scripts/deploy1.sh #调用另一个脚本部署代码
复制代码
git pull 时要求手动保存时显示的信息如下:
- Merge branch 'dev' into master
- # Please enter a commit message to explain why this merge is necessary,
- # especially if it merges an updated upstream into a topic branch.
- #
- # Lines starting with '#' will be ignored, and an empty message aborts
- # the commit.
复制代码
|
|