Ich versuche ein Remote-Git-Repo zu erstellen (das ich mit der Option --bare
initialisiert habe) und schiebe einige Quelldateien dorthin.Zielverzeichnis leer nach git push to remote
Ich habe eine lokale Git Repo und einem nackten remote:
[email protected]:~/notebooks$ cat .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[branch "master"]
[remote "nbcsm"]
url = ssh://[email protected]/home/ubuntu/notebooks/.git
fetch = +refs/heads/*:refs/remotes/nbcsm/*
ich die lokale Repo erstellt mit: 1. git init
2. git add *.ipynb
3. `git commit -m„erste Import von IPython Notebooks "
Ich habe dann überprüft, dass mein lokaler Repo Dateien darin verfolgt hat, indem Sie vi verwenden, um eine * .ipynb-Datei zu bearbeiten und dann git status
auszuführen. git sieht die geänderte Datei.
Allerdings, wenn ich git push nbcsm master
die Push ausführen scheint erfolgreich zu sein, aber das Zielverzeichnis auf meinem Remote-Computer/Instanz leer ist (dh es nicht die Dateien enthalten ich auf die Fernbedienung zu drücken bin versucht):
[email protected]:~/notebooks$ git push nbcsm master
Enter passphrase for key '/home/ubuntu/.ssh/id_rsa':
Counting objects: 11, done.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (9/9), 2.49 KiB, done.
Total 9 (delta 5), reused 0 (delta 0)
To ssh://[email protected]/home/ubuntu/notebooks/.git
7a50f44..295a4fa master -> master
[email protected]:~/notebooks$
Überprüfen, dass die Dateien nicht auf remote:
[email protected]:~/notebooks$ ssh [email protected]
Enter passphrase for key '/home/ubuntu/.ssh/id_rsa':
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-25-virtual x86_64)
* Documentation: https://help.ubuntu.com/
System information as of Tue Dec 18 16:46:23 UTC 2012
System load: 0.02 Processes: 63
Usage of /: 41.7% of 7.97GB Users logged in: 0
Memory usage: 12% IP address for eth0:REMOTE-IP
Swap usage: 0%
Graph this data and manage this system at https://landscape.canonical.com/
Get cloud support with Ubuntu Advantage Cloud Guest
http://www.ubuntu.com/business/services/cloud
*** /dev/xvda1 will be checked for errors at next reboot ***
[email protected]:~$ sudo find /home/ubuntu/ -name "*.ipynb"
/home/ubuntu/notebooks/Untitled0.ipynb
[email protected]:~$
Es gibt etwa 12 * .ipynb Dateien im lokalen Repo, die nicht geschoben werden. Ich bin mir ziemlich sicher, dass dies ein konzeptuelles Problem und kein Syntaxproblem ist, aber ich habe das Remote-Kapitel im O'Reilly Git-Buch gelesen und gelesen und bin ratlos.
Ausführlichere Erklärung, sowohl für nicht-bloße als auch für leere Repos, als meine. +1 – VonC