2015-11-10 81 views
0

其中一項資源已經在我們網站的服務器上直接更新和更改。如何在服務器上直接更改文件時更新我的​​git?

我應該怎麼做才能確保我的本地和git都是用服務器文件更新的?

當我在我的服務器上的SSH之後做了git status,我得到這個: -

On branch master 
# Changed but not updated: 
# (use "git add <file>..." to update what will be committed) 
# 
# modified: sites/all/themes/xxx/css/styles.css 
# modified: sites/all/themes/xxx/css/styles-print.css 
# modified: sites/all/themes/xxx/templates/views/views-view--all-documents--block.tpl.php 
# modified: sites/all/themes/mso/templates/views/views-view--all-articles--block.tpl.php 
# 
no changes added to commit (use "git add" and/or "git commit -a") 

非常感謝。

回答

1

您必須提交更改然後推送它們。之後,拉取您的本地存儲庫中的更改。

在您的服務器:

git add . 
git commit -m "Your message" 
git push 

在你的本地庫:

git pull 
+0

非常感謝。它工作完美。 – Steve

相關問題