Sto tentando di creare un repo git remoto, (che ho inizializzato con l'opzione --bare
) e di inviarvi alcuni file sorgente.directory di destinazione vuota dopo git push su remoto
Ho un repository git locale e una remota nuda:
[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/*
ho creato il repo locale con: 1. git init
2. git add *.ipynb
3. `git commit -m "prima importazione di IPython Notebook "
Ho quindi verificato che il mio repository locale ha tracciato i file in esso utilizzando vi per modificare un file * .ipynb e quindi eseguendo git status
. git vede il file modificato.
Tuttavia, quando eseguo git push nbcsm master
la spinta sembra essere successo, ma la directory di destinazione sul mio computer/istanza remota è vuoto (cioè non contiene i file che sto cercando di spingere al telecomando):
[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$
Verificando che i file non sono 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]:~$
ci sono circa 12 * .ipynb file nel repository locale che non vengono spinte. Sono abbastanza certo che si tratta di un problema concettuale piuttosto che di una sintassi, ma ho letto e riletto il capitolo Remote nel libro O'Reilly Git e sono perplesso.
Spiegazione più completa, sia per repository non bare e bare, che miniera. +1 – VonC