我正在製作分叉式回購的本地副本。Git rebase upstream/master - 請在您更改分支之前提交您的更改或存儲它們
在我推送更改之前,我想確保我的副本與上游/主站保持同步。這是我做過什麼:
$ git fetch upstream
$ git add /webroot/wp-content/plugins/cbp_recycling
$ git commit -m "cbp_recycling added"
[develop 36411f0] cbp-recycling added
42 files changed, 830 insertions(+)
$ git status
# On branch develop
# Your branch is ahead of 'origin/develop' by 1 commit.
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# logs/
# webroot/.htaccess
# webroot/wp-content/plugins/CBP_Promobox/
nothing added to commit but untracked files present (use "git add" to track)
$ git rebase upstream/master
First, rewinding head to replay your work on top of it...
error: Your local changes to the following files would be overwritten by checkout:
webroot/wp-config.php
Please, commit your changes or stash them before you can switch branches.
Aborting
could not detach HEAD
的wp-config.php文件沒有改變,因爲我已經添加了我的數據庫憑據,但當時爲什麼不上市的時候我跑git的狀態?
我的.gitignore文件:
.idea
.vagrant
.DS_Store
什麼我做錯了,如何更新我的本地副本上游/大師。
也許還有'。'webroot /'中排除'wp-config.php'的gitignore文件? – rednaw
'git fetch'只能從上游下載對象和引用。你也想'git merge upstream/master'。 –
沒有.gitignore在webroot/ –