获取当前Git Develop分支,而不是过时的Fork

获取当前Git Develop分支,而不是过时的Fork,git,github,Git,Github,我想签出开发人员分支。但是,我只在本地计算机上看到过时的文件,而没有从服务器获取最近修改的文件。 文件“contribution.md”上的拉取请求已合并: 但我无法将此版本的文件提取到本地计算机 我几乎用“git pull”和“git fetch”尝试了所有东西 [franz@localhost PHPWord (develop)]$ git pull origin develop From https://github.com/franzholz/PHPWord * branch

我想签出开发人员分支。但是,我只在本地计算机上看到过时的文件,而没有从服务器获取最近修改的文件。 文件“contribution.md”上的拉取请求已合并: 但我无法将此版本的文件提取到本地计算机

我几乎用“git pull”和“git fetch”尝试了所有东西

[franz@localhost PHPWord (develop)]$ git pull origin develop 
From https://github.com/franzholz/PHPWord
* branch            develop    -> FETCH_HEAD
Already up-to-date.


[franz@localhost PHPWord (develop)]$ git pull upstream develop
From https://github.com/franzholz/PHPWord
* branch            develop    -> FETCH_HEAD
Already up-to-date.
我已经阅读并遵循了几篇Git教程以及关于Git的本期:

如果我打开网站:

然后,我在第一行看到“欢迎所有贡献”

我在本地机器上执行

[franz@localhost 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上的叉子也过时了。 如何在服务器端更新此fork?

Github帮助“同步fork”:

我被困在这里了。我希望看到真正固定的文件,因为它位于开发分支的Git在线存储库中。我确信我的本地开发分支已经连接到远程开发分支。但是如何使用文件系统来查看名为“contribution.md”的真正新文件呢


我找到了一段视频,解释了必要的步骤。忘记网上的教程吧

我必须执行这些视频中的步骤

[franz@localhost PHPWord (develop)]$ git remote rm upstream
[franz@localhost PHPWord (develop)]$ git remote add upstream  https://github.com/PHPOffice/PHPWord.git 
[franz@localhost 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/PHPOffice/PHPWord.git (fetch)
upstream    https://github.com/PHPOffice/PHPWord.git (push)
[franz@localhost PHPWord (develop)]$ git fetch upstream
remote: Counting objects: 6758, done.
remote: Compressing objects: 100% (1434/1434), done.
remote: Total 6758 (delta 6608), reused 5377 (delta 5313)
Receiving objects: 100% (6758/6758), 9.43 MiB | 2.35 MiB/s, done.
Resolving deltas: 100% (6608/6608), done.
From https://github.com/PHPOffice/PHPWord
* [new branch]      develop    -> upstream/develop
* [new branch]      gh-pages   -> upstream/gh-pages
* [new branch]      master     -> upstream/master


[franz@localhost PHPWord (develop)]$ git merge upstream/master 
Fusion automatique de docs/elements.rst
CONFLIT (contenu) : Conflit de fusion dans docs/elements.rst
Automatic merge failed; fix conflicts and then commit the result.

[franz@localhost PHPWord (develop|MERGING)]$ git merge upstream/develop 
error: 'merge' is not possible because you have unmerged files.
astuce: Corrigez-les dans la copie de travail,
astuce: et utilisez 'git add/rm <fichier>' si
astuce: nécessaire pour marquer la résolution et valider,
astuce: ou utilisez 'git commit -a'.
fatal: Exiting because of an unresolved conflict.

[franz@localhostPHPWord(开发)]$git远程rm上游
[franz@localhostPHPWord(开发)]$git远程添加上游https://github.com/PHPOffice/PHPWord.git 
[franz@localhostPHPWord(开发)]$git远程-v
起源https://github.com/franzholz/PHPWord.git (取回)
起源https://github.com/franzholz/PHPWord.git (推)
上游https://github.com/PHPOffice/PHPWord.git (取回)
上游https://github.com/PHPOffice/PHPWord.git (推)
[franz@localhostPHPWord(开发)]$git取上游
远程:计数对象:6758,完成。
远程:压缩对象:100%(1434/1434),完成。
远程:总计6758(增量6608),重复使用5377(增量5313)
接收对象:100%(6758/6758),9.43 MiB | 2.35 MiB/s,完成。
解析增量:100%(6608/6608),完成。
从…起https://github.com/PHPOffice/PHPWord
*[新分行]发展->上游/发展
*[新分行]gh页面->上游/gh页面
*[新分行]主控->上游/主控
[franz@localhostPHPWord(开发)]$git合并上游/主
Fusion automatique de docs/elements.rst
CONFLIT(contenu):CONFLIT de fusion dans docs/elements.rst
自动合并失败;修复冲突,然后提交结果。
[franz@localhostPHPWord(开发|合并)]$git上游合并/开发
错误:“合并”不可能,因为您有未合并的文件。
主旨:劳动生产率,
astuce:et使用“git添加/rm”si
产品:nécestaire pour marker la résolution et valider,
astuce:ou使用“git commit-a”。
致命:由于未解决的冲突而退出。

由于冲突,任务未完成。然而,这是另一个问题。至少,从原始回购协议中提取和合并到我的本地计算机似乎是可行的。解决冲突后,我将能够将本地分支推回到远程分支。

git rev parse HEAD显示了什么?
[franz@localhostPHPWord(开发)]$git版本解析头bf0136c15680266bc31bcb662809843162f7b11d
[franz@localhost 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)


[franz@localhost 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

[franz@localhost PHPWord (develop)]$ git log
commit bf0136c15680266bc31bcb662809843162f7b11d
Author: Roman Syroeshko <syroeshkoro@gmail.com>
Date:   Sat Aug 16 15:46:38 2014 +0400

    https://github.com/PHPOffice/PHPWord/issues/216

commit d66e8559e6248eb26ea4942a244993731da9c5ce
Author: Progi1984 <progi1984@gmail.com>
Date:   Sat Aug 16 13:28:27 2014 +0200

    #23 : Implement Word97 aka MsDoc Reader (Documentation )



[franz@localhost 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


[franz@localhost PHPWord (develop)]$ git remote add --track develop upstream https://github.com/PHPOffice/PHPWord.git 
fatal: la distante upstream existe déjà.

[franz@localhost 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)

[franz@localhost PHPWord (develop)]$ git fetch upstream
[franz@localhost PHPWord (develop)]$ git merge upstream/develop 
Already up-to-date.
[franz@localhost PHPWord (develop)]$ git pull origin remotes/origin/develop 
fatal: Couldn't find remote ref remotes/origin/develop
Unexpected end of command stream

[franz@localhost PHPWord (develop)]$ git pull origin origin/develop 
fatal: Couldn't find remote ref origin/develop
Unexpected end of command stream
[franz@localhost PHPWord (develop)]$ 
[franz@localhost 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.
[franz@localhost PHPWord (develop)]$ git remote rm upstream
[franz@localhost PHPWord (develop)]$ git remote add upstream  https://github.com/PHPOffice/PHPWord.git 
[franz@localhost 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/PHPOffice/PHPWord.git (fetch)
upstream    https://github.com/PHPOffice/PHPWord.git (push)
[franz@localhost PHPWord (develop)]$ git fetch upstream
remote: Counting objects: 6758, done.
remote: Compressing objects: 100% (1434/1434), done.
remote: Total 6758 (delta 6608), reused 5377 (delta 5313)
Receiving objects: 100% (6758/6758), 9.43 MiB | 2.35 MiB/s, done.
Resolving deltas: 100% (6608/6608), done.
From https://github.com/PHPOffice/PHPWord
* [new branch]      develop    -> upstream/develop
* [new branch]      gh-pages   -> upstream/gh-pages
* [new branch]      master     -> upstream/master


[franz@localhost PHPWord (develop)]$ git merge upstream/master 
Fusion automatique de docs/elements.rst
CONFLIT (contenu) : Conflit de fusion dans docs/elements.rst
Automatic merge failed; fix conflicts and then commit the result.

[franz@localhost PHPWord (develop|MERGING)]$ git merge upstream/develop 
error: 'merge' is not possible because you have unmerged files.
astuce: Corrigez-les dans la copie de travail,
astuce: et utilisez 'git add/rm <fichier>' si
astuce: nécessaire pour marquer la résolution et valider,
astuce: ou utilisez 'git commit -a'.
fatal: Exiting because of an unresolved conflict.