Xcode + GitHub = HILFE

Was meinst du beim kopieren ?

Ich habe mein Projekt, einfach in den Ordner " Neu " verschoben
 
Also nochmal (ohne Projektdateien)

Code:
mkdir neu
cd neu
git clone https://...
echo >Test.txt "Hallo Welt"
git add .
git commit -m "Commit"
git push origin master

Wenn das nicht geht, im kpmplett neuen Verzeichnis, dann muss ich mal ein Github Repo neu anlegen.
In dem "neu" darf NICHTS drin sein. Auch kein altes ".git". Das sieht man nur mit "ls -la".
 
Wenn in dem Projekt noch ein versteckter ".git" Ordner war, dann war das der Fehler.
Nur die zum Projekr gehörenden Ordner. Nicht ein unsichtbares ".git".
 
Wenn ich eine neue Repostiory anlege, soll ich dann ein Hacken bei:

Initialize this repository with a README
This will allow you to git clone the repository immediately. Skip this step if you have already run git init locally.

machen ?
 
Egal. Entweder siehst Du nach dem clone ein README oder git sagt "Warning. Cloning an empty repository" oder so.
Aber Du darfst dann halt nicht Deinen kompletten alten Ordner da rein ziehen.
Sonst kommt ein altes ".git" mit.
 
Ich bin kurz vorm ausrasten.

Ich habe eine neue Repository erstellt und alles so gemacht wie du es gesagt hast :

mkdir neu
cd neu
git clone https://...
echo >Test.txt "Hallo Welt"
git add .
git commit -m "Commit"
git push origin master


Ich kriege wieder die gleiche Fehlermeldung :

remote: Repository not found.
fatal: repository 'https://github.com/ALTE_REPOSITORY/ALTE_REPOSITORY/' not found


Ach ja : Als ich : git add . eingeben wollte hab ich eine Meldung bekommen :


warning: You ran 'git add' with neither '-A (--all)' or '--ignore-removal',
whose behaviour will change in Git 2.0 with respect to paths you removed.
Paths like 'neu/Test' that are
removed from your working tree are ignored with this version of Git.

* 'git add --ignore-removal <pathspec>', which is the current default,
ignores paths you removed from your working tree.

* 'git add --all <pathspec>' will let you also record the removals.

Run 'git status' to check the paths you removed from your working tree.


Habe dann aber einfach weiter gemacht.

Also danach hab ich: git commit -m "Commit" eingegeben.
 
Ich leg mal eins an. Du musst irgendwas irgendwo eingestellt haben.
Das mit dem add hat sich wohl geandert ... git add -A ware OK gewesen. Ist aber für den Fehler egal.
 
Ja ...

Wie ich bereits auf der 1 Seite gesagt hab :

[...] Unzwar hab ich in den Xcode Einstellungen (Xcode -> Preferences -> Accounts ) ausersehen eine falsche Repository eingetragen. Diese Repository wollte ich dann aber auch löschen, doch dann öffnete sich ein Fenster ( Sowie auf dem Bild ( Bild ist im Anhang ) ) und da hab ich auf DONT Remove gedrückt. Jetzt ist es aber trotzdem aus der Liste verschwunden und ich kann Git nicht mehr richtig benutzen, sprich: Ich kann über Terminal keine Projekte mehr hochladen da ich dann diese Fehlermeldung bekomme :

remote: Repository not found.
fatal: repository 'https://github.com/XY/XYXY' not found




....
 
Also. Hier ist alles was ich nach dem Anlegen mit README gemacht habe:

Code:
# mkdir neu 
# cd neu/
# git clone https://github.com/XXXXX/TestGit.git
Cloning into 'TestGit'...
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
Checking connectivity... done.

# cd TestGit/
# git remote show
origin

# git remote show origin
* remote origin
  Fetch URL: https://github.com/XXXXX/TestGit.git
  Push  URL: https://github.com/XXXXX/TestGit.git
  HEAD branch: master
  Remote branch:
    master tracked
  Local branch configured for 'git pull':
    master merges with remote master
  Local ref configured for 'git push':
    master pushes to master (up to date)

# git log
commit 5fbec80e70e46724e495f1880a813e03cXXXXXXX
Author: XXXXX
Date:   Sun Apr 20 15:37:41 2014 -0700

    Initial commit

# vi Test.txt 
# git add -A

# git push 
Username for 'https://github.com': XXX@YYY
Password for 'https://XXX@YYY@github.com': 
Counting objects: 4, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 270 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://github.com/XXXXX/TestGit.git
   5fbec80..5bfc208  master -> master

Das muss gehen. Das hat mit Xcode nichts zu tun. Leg noch eins an.
Im Terminal muss das so gehen. Andere Informationen hat git nicht.

EDIT:

Da mit README ja schon ein commit da ist reicht ein "git push" ohne "origin master".
 
Alles Klar, ich werds morgen früh nochmal versuchen.

Danke für deine Hilfe :)
 
OK. Ich bin auch weg.
 
Also. Hier ist alles was ich nach dem Anlegen mit README gemacht habe:

[


Was meinst du genau mit " README " ?

Muss ich das jetzt in die ReadMe.txt eintragen ?

Oder einfach nur wieder in den Terminal tippen ?
 
Mit "Anlegen mit README" meinte ich nur, dass ich bei Github das README mit angelegt habe.
Dadurch hat man beim clone schon ein commit im Repository.
Ansonsten ist es leer.

Oben steht von github bis push alles, was ich machen musste.
 
Okay, dann werde ich das gleich alles in den Terminal tippen...

Hoffe das es jetzt mal funktioniert...
 
Wenn ich

vi Test.txt
eingebe, kann ich in meinem Terminal Fenster irgendein Text eintippen, was muss da alles rein ?
 
<i> Kleines "i"
Hallo
<ESC>
:wq
<ENTER>


Ich arbeite seit 10 Jahren mit vi und komm nicht raus ;)
 
Es spielt keine Rolle was Du machst, leg halt EINE Datei an.
(Und kopier nicht Dein Projekt da hin)
 
Okay,hab grad alles nochmal von vorne gemacht, ich komme aber irgendwie aus " vi " nicht raus...

Hab ESC gedrückt, bin aber immer noch drin..
 
Ah, hat sich erledigt, hab das :wq nicht gelesen
 
So, habe jetzt alle schritte gemacht.

Als ich git push eingeben habe, habe ich folgendes wiederbekommen :


warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:

git config --global push.default matching

To squelch this message and adopt the new behavior now, use:

git config --global push.default simple

See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)

Everything up-to-date



Und jetzt ?
 
Zurück
Oben Unten