2016-04-15 11 views
-2

にプッシュすることはできません。Githubのは、私は、次の取得レポにプッシュしようとしているとき、私はブランチ

To https://github.com/Ekultek/whitewidow.git 
! [rejected]  master -> master (fetch first) 
error: failed to push some refs to 'https://github.com/Ekultek/whitewidow.git' 
hint: Updates were rejected because the remote contains work that you do 
hint: not have locally. This is usually caused by another repository pushing 
hint: to the same ref. You may want to first integrate the remote changes 
hint: (e.g., 'git pull ...') before pushing again. 
hint: See the 'Note about fast-forwards' in 'git push --help' for details. 

それは私がプッシュすることができませんなぜ私は混乱していますか?

ことの私がここに来たかの上に行こう:

は、私はすでに、他のリポジトリを引っ張ってきた、コードの約300行を変更し、全体>>>>>HEAD + >>>>>>324240283<random-numbers>の事を見てきました。レポでいくつかの新しい変更がある

C:\Users\Justin\myscripts\rubysql\whitewidow [master +2 ~1 -0 !]> git pull https://github.com/Ekultek/whitewidow 
remote: Counting objects: 169, done. 
remote: Compressing objects: 100% (30/30), done. 
Receiving objects: 92% (156/169) al 169 (delta 14), reused 3 (delta 3), pack-reused 136 
Receiving objects: 100% (169/169), 56.76 KiB | 0 bytes/s, done. 
Resolving deltas: 100% (86/86), completed with 2 local objects. 
From https://github.com/Ekultek/whitewidow 
* branch   HEAD  -> FETCH_HEAD 
warning: Cannot merge binary files: README.md (HEAD vs. 281bf372e265d81c0b020747e59eb7935c339d78) 
Auto-merging whitewidow.rb 
CONFLICT (content): Merge conflict in whitewidow.rb 
Auto-merging log/non_exploitable.txt 
CONFLICT (content): Merge conflict in log/non_exploitable.txt 
Auto-merging log/error_log.LOG 
CONFLICT (content): Merge conflict in log/error_log.LOG 
Auto-merging log/SQL_VULN.LOG 
CONFLICT (content): Merge conflict in log/SQL_VULN.LOG 
Auto-merging lib/spider.rb 
CONFLICT (content): Merge conflict in lib/spider.rb 
Auto-merging lib/search_query.txt 
CONFLICT (content): Merge conflict in lib/search_query.txt 
Auto-merging lib/rand-agents.yaml 
CONFLICT (content): Merge conflict in lib/rand-agents.yaml 
Auto-merging lib/legal.rb 
CONFLICT (content): Merge conflict in lib/legal.rb 
Auto-merging lib/credits.rb 
Auto-merging lib/copy.rb 
Auto-merging docs/COPYRIGHT.md 
CONFLICT (add/add): Merge conflict in docs/COPYRIGHT.md 
Auto-merging docs/CHANGELOG.md 
CONFLICT (add/add): Merge conflict in docs/CHANGELOG.md 
Auto-merging README.md 
CONFLICT (content): Merge conflict in README.md 
Auto-merging Gemfile 
CONFLICT (add/add): Merge conflict in Gemfile 
Automatic merge failed; fix conflicts and then commit the result. 
C:\Users\Justin\myscripts\rubysql\whitewidow [master +5 ~2 -0 !9 | +5 ~1 -0 !9 !]> git push 
To https://github.com/Ekultek/whitewidow.git 
! [rejected]  master -> master (non-fast-forward) 
error: failed to push some refs to 'https://github.com/Ekultek/whitewidow.git' 
hint: Updates were rejected because the tip of your current branch is behind 
hint: its remote counterpart. Integrate the remote changes (e.g. 
hint: 'git pull ...') before pushing again. 
+0

ヒントをお読みになりましたか?不明な点は何ですか? – jonrsharpe

+0

私は実際に '--help'セクション全体を読みました。私はリポジトリを引っ張りましたが、同じことが言います。 – JasonBorne

+0

...なぜあなたは*それを言及していないのですか?!*あなたはこの状態にどれくらい正確に慣れましたか? – jonrsharpe

答えて

0

、あなたはちょうどあなたが最初に新しいを引っ張っする必要は、プッシュすることはできません。

しかし、私はまだ、私はそれは私に同じ出力を与えてみたときにプッシュすることはできません変更し、その後、あなたはプッシュすることはできません。一方で、あなたはプッシュを強制的にGitのプッシュ-fを行うことができます

、私はあなたがそれを行うにはしたくないと思います。.. :)

+0

それを押す前にリポジトリをクローンする必要がありますか? – JasonBorne

+0

いいえ、最初にgit pullする必要があります –

0

原点リポジトリが更新されているとあなたがいませんローカルリポジトリを更新しました。ローカルリポジトリを更新する典型的な方法は、コマンドgit push <remote> <branch>を使用することです。リポジトリを作成してブランチまたはリモートを作成していない場合は、git push origin masterをコマンドラインに入力します(gitbashまたはlinux、 Macについては、Windows上では動作しないと思わないでください)、.gitファイルを保持するディレクトリにあります。

GUIツールを使用してgitを処理している場合、通常は「プル」というボタンがあります。これをクリックして、もう一度押してみてください。

+0

私はちょうどレポを引っ張って、それは同じことを言う – JasonBorne

0

リモートリポジトリには、ローカルリポジトリにはコミットしていないコミットがあり、最初にそれをプルします。私は誰かがあなたのリモートリポジトリに新しいコミットをプッシュしていると思うし、コミットをプッシュする前にそれをプルする必要があります。

関連する問題