2016-04-17 17 views
0

amarjobsという名前のリポジトリを作成しました。コマンドを使ってgithubリポジトリにファイルをアップロードするには?

ファイルがありません。
作業ファイルをこのリポジトリにアップロードします。
私はいくつかのステップ行っている:

git init 
git remote add origin url 
git pull 
git push origin master 

をしかし、そのはgitのでerror.I午前の初心者をスローします。
私は検索しましたが、私の問題は満足のいく答えを得られません。
誰も私の問題を解決できますか?

エラー:

This is the error

感謝。

+0

お持ちでない場合は、githubのガイドを見て可能性があります。https://で助けを。 github.com/categories/managing-remotes/ – Warrior

答えて

1

あなたが持っていないリモートブランチに変更があるため、プッシュできません。
プッシュの前にgit pullを実行するだけでこの問題を解決できます。


これらの手順に従ってください、あなたはgithubのにコードをプッシュすることができます:

# Create a git repository in the folder 
git init 

# add the remote url 
git remote add origin [email protected]:chonchol/amajobs.git 

# add your code to the repository 
git add . 

# commit your code 
git commit -m "Message..." 

# now once you have your code committed updated your branch with the remote code 
git pull 

# now once you have the commit message of the merge - commit and push 
git push origin master 
+0

作業していないすべての手順を見てくださいhttp://s24.postimg.org/7ptjofuth/Untitled.png –

+1

私はあなたの問題を参照してください、あなたはgitの古いバージョンがあります。 'git pull origin master'を実行すれば動作します。 – CodeWizard

+0

gitの古いバージョンを使用しています。プルの振る舞いはgit v2.0で変更されました。詳細については、この回答を参照してください:http://stackoverflow.com/questions/36666709/default-set-of-refspec-for-git-push/36669881#36669881 – CodeWizard

関連する問題