我想結算https://github.com/PHPOffice/PHPWord開發者分支。但是,我只能在本地機器上看到過時的文件,並且沒有從服務器獲取最近修改的文件。 對文件「CONTRIBUTING.md」的拉取請求已合併: https://github.com/PHPOffice/PHPWord/commit/48322ca89c09ad2bb2f5f6bb1fc60b872bde8c16 但我無法將此版本的文件提取到本地機器。獲取當前的Git開發分支而不是過時的分支
我嘗試了幾乎所有的'git pull'和'git fetch'。
[[email protected] PHPWord (develop)]$ git pull origin develop
From https://github.com/franzholz/PHPWord
* branch develop -> FETCH_HEAD
Already up-to-date.
[[email protected] PHPWord (develop)]$ git pull upstream develop
From https://github.com/franzholz/PHPWord
* branch develop -> FETCH_HEAD
Already up-to-date.
我已閱讀並沒有遵循幾個Git的教程和也是這個問題有關的Git: How to clone all remote branches in Git?
如果我打開網站:
https://github.com/PHPOffice/PHPWord/blob/develop/CONTRIBUTING.md
然後我看到文本「歡迎每一個貢獻;「在第一行。
在我的本地機器上執行。
[[email protected] PHPWord (develop)]$ head -3 CONTRIBUTING.md
# Contributing to PHPWord
PHPWord is build by the crowd and for the crowd. Every contributions are welcomed; either by [submitting](https://github.com/PHPOffice/PHPWord/issues) bug issues or suggesting improvements, or in a more active form like [requesting](https://github.com/PHPOffice/PHPWord/pulls) a pull.
這裏總是過時的,而不是固定的文本:「每一個貢獻值得歡迎」。
我的叉子Github也過時了。 https://github.com/franzholz/PHPWord/blob/develop/CONTRIBUTING.md 如何在服務器端更新這個分支?
Github上幫助 「正在同步叉子」:
[[email protected] PHPWord (develop)]$ git merge upstream/develop
Already up-to-date.
我在這裏停留。我想看到真正修復的文件,因爲它位於develop分支的Git聯機存儲庫。我確信我的本地開發分支已經連接到遠程開發分支。但是,如何使用我的文件系統查看名爲「CONTRIBUTING.md」的真正新文件?
[[email protected] PHPWord (develop)]$ git remote show origin
* distante origin
URL de rapatriement : https://github.com/franzholz/PHPWord.git
URL push : https://github.com/franzholz/PHPWord.git
Branche HEAD : develop
Branches distantes :
develop suivi
gh-pages suivi
master suivi
patch-1 suivi
patch-2 suivi
Branches locales configurées pour 'git pull' :
develop fusionne avec la distante develop
master fusionne avec la distante master
Références locales configurées pour 'git push' :
develop pousse vers develop (à jour)
master pousse vers master (à jour)
[[email protected] PHPWord (develop)]$ ls -l
total 256
-rw-r--r-- 1 franz live 21042 sept. 18 13:23 CHANGELOG.md
-rw-r--r-- 1 franz live 1979 sept. 18 13:23 composer.json
-rw-r--r-- 1 franz live 131936 sept. 18 13:23 composer.lock
-rw-r--r-- 1 franz live 1876 sept. 17 20:16 CONTRIBUTING.md
-rw-r--r-- 1 franz live 35147 sept. 17 20:16 COPYING
-rw-r--r-- 1 franz live 7651 sept. 17 20:16 COPYING.LESSER
drwxr-xr-x 4 franz live 4096 sept. 18 13:51 docs/
-rw-r--r-- 1 franz live 688 sept. 17 20:16 LICENSE
-rw-r--r-- 1 franz live 1185 sept. 18 13:23 phpmd.xml.dist
-rw-r--r-- 1 franz live 970 sept. 17 20:16 phpunit.xml.dist
-rw-r--r-- 1 franz live 303 sept. 18 13:23 phpword.ini.dist
-rw-r--r-- 1 franz live 7589 sept. 18 13:23 README.md
drwxr-xr-x 5 franz live 4096 sept. 18 13:23 samples/
drwxr-xr-x 3 franz live 4096 sept. 17 20:16 src/
drwxr-xr-x 3 franz live 4096 sept. 17 20:16 tests/
-rw-r--r-- 1 franz live 6 sept. 18 13:23 VERSION
[[email protected] PHPWord (develop)]$ git log
commit bf0136c15680266bc31bcb662809843162f7b11d
Author: Roman Syroeshko <[email protected]>
Date: Sat Aug 16 15:46:38 2014 +0400
https://github.com/PHPOffice/PHPWord/issues/216
commit d66e8559e6248eb26ea4942a244993731da9c5ce
Author: Progi1984 <[email protected]>
Date: Sat Aug 16 13:28:27 2014 +0200
#23 : Implement Word97 aka MsDoc Reader (Documentation)
[[email protected] PHPWord (develop)]$ git branch -a
* develop
master
remotes/origin/HEAD -> origin/master
remotes/origin/develop
remotes/origin/gh-pages
remotes/origin/master
remotes/origin/patch-1
remotes/origin/patch-2
remotes/upstream/develop
remotes/upstream/gh-pages
remotes/upstream/master
remotes/upstream/patch-1
remotes/upstream/patch-2
remotes/upstream/patch-3
[[email protected] PHPWord (develop)]$ git remote add --track develop upstream https://github.com/PHPOffice/PHPWord.git
fatal: la distante upstream existe déjà.
[[email protected] PHPWord (develop)]$ git remote -v
origin https://github.com/franzholz/PHPWord.git (fetch)
origin https://github.com/franzholz/PHPWord.git (push)
upstream https://github.com/franzholz/PHPWord.git (fetch)
upstream https://github.com/franzholz/PHPWord.git (push)
[[email protected] PHPWord (develop)]$ git fetch upstream
[[email protected] PHPWord (develop)]$ git merge upstream/develop
Already up-to-date.
現在我仍然沒有最新版本的當前分支中的上游代碼。
[[email protected] PHPWord (develop)]$ git pull origin remotes/origin/develop
fatal: Couldn't find remote ref remotes/origin/develop
Unexpected end of command stream
[[email protected] PHPWord (develop)]$ git pull origin origin/develop
fatal: Couldn't find remote ref origin/develop
Unexpected end of command stream
[[email protected] PHPWord (develop)]$
[[email protected] PHPWord (develop)]$ git pull origin/develop
fatal: 'origin/develop' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
'git rev-parse HEAD'顯示什麼? – 2014-09-20 02:22:15
'[franz @ localhost PHPWord(develop)] $ git rev-parse HEAD bf0136c15680266bc31bcb662809843162f7b11d' – 2014-09-20 07:06:48