2016-04-17 3 views
0

Ich habe ein Repository namens amarjobs erstellt.Wie lade ich meine Dateien im github-Repository mit Befehl hoch?

Es gibt keine Datei jetzt.
Ich möchte meine Arbeitsdatei in dieses Repository hochladen.
Ich habe einige Schritt getan:

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

Aber sein ein error.I Uhr Anfänger mit git wirft.
Ich habe gesucht, aber ich bekomme keine zufriedene Antwort für mein Problem.
Konnte jemand mein Problem lösen?

Fehler:

This is the error

Dank.

+0

Sie haben an der Github Führung einen Blick, wenn Sie nicht bereits haben: https: // Hilfe. github.com/categories/managing-remotes/ – Warrior

Antwort

1

Sie können nicht drücken, da es Änderungen im Remote-Zweig gibt, die Sie nicht haben.
Sie können einfach git pull vor dem Push ausführen und es wird dieses Problem beheben.


diese Schritte folgen, und Sie werden Ihren Code zu schieben Lage, 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

funktioniert nicht, werfen Sie einen Blick auf alle Verfahren http://s24.postimg.org/7ptjofuth/Untitle.png –

+1

Ich sehe Ihr Problem, Sie haben eine alte Version von Git. tu dies: 'git pull origin master' und es wird funktionieren. – CodeWizard

+0

Sie verwenden eine alte Version von Git. Das Pull-Verhalten war Änderungen in Git v2.0. Lesen Sie mehr darüber in dieser Antwort: http://stackoverflow.com/questions/36666709/default-set-of-refspec-for-git-push/36669881#36669881 – CodeWizard

Verwandte Themen