2015-10-08 22 views
5

kaynak kodu ve yamaları göndermek için git send-e kullanılamıyor:Bir dizin yerel oluşturduk

hello_world.c hello_world_1.c hello_world_2.c 

Her dosya aşamalı: Ben Dosyalar iç/home/Tegra şu yarattık /home/Tegra.

değiştirilmiş.

diff -u hello_world.c hello_world_1.c > hello_world_1.patch 
diff -u hello_world_1.c hello_world_2.c > hello_world_2.patch 
  1. Şimdi ilk send-e adresi [email protected] e-posta budala kullanarak bir e-posta göndermek istiyorum: Ben aynı zamanda yamalar oluşturduk. hello_world.c dosyayı

  2. içermelidir Sonra eki olarak hello_world_1.patch dosyası ile ikinci e-posta göndermek istiyorum.

  3. Ardından, e-posta ile hello_world_2.patch dosyası olarak üçüncü e-posta göndermek istiyorum. Benim git düzgün alakalı SMTP sunucusu ile yapılandırıldı

    587 portu TLS:

Ne yazık ki, 1. adımı yapmak için bile mümkün değilim. Ben hata aşağıdaki almak

git send-email --to [email protected] --subject My Hello hello_world.c 

:

Cannot run git format-patch from outside a repository 

depo içine resim geliyor

aşağıdaki komutu çalıştı. Kodumun bir havuzunu ilk önce saklamak zorundayım.

Düzenleme: 1. adımda İçin: "MyRepo" yerel makinede Klonlanmış

  • : Github bir boş depoyu düzenlendi

    1. : Yorumlar başı olarak biz deposuna ihtiyaç aşağıda. (Kullanarak git clone)
    2. Sonra Dizin/MyRepo" içine ilk dosya "hello_world.c" eklendi. Sonra
    3. >> git add Sonra hello_world.c
    4. >> git -m 'My First kaynağını işlemek 'kökenli usta -u
    5. sonra >> git push Bundan sonra
    6. , ben daktilo: git send-posta [email protected] --subject = "[asdasdas] assd asdasd" hello_world.c

    Şimdi bir hata iletisi alıyorum:

    No subject line in hello_world.c ? at /usr/lib/git-core/git-send-email line 584 
    
  • +1

    Evet. gönder-e-posta, havuzunuzdaki bir değişiklikten yama oluşturur ve gönderir. Git yönetilen bir dosyaya veya dizine işaret etmeniz gerekir. –

    +0

    Merhaba @AndreasWederbrand, Github üzerinde bir Boş Depo oluşturdum: "MyRepo", yerel makinede klonladı, sonra ilk dosyayı "/ MyRepo" dizinine ekledi. Bundan sonra yazdım: git send-email [email protected] --subject = "[asdasdas] assd asdasd" hello_world.c Şimdi bir hata alıyorum: hello_world.c'de konu olmayan bir satır var mı?/usr/lib/git-core/git-gönder-e-posta satırında 584. – Haswell

    cevap

    1

    Then added the first file "hello_world.c" into the Directory /MyRepo".

    İlk gerçekte klonlanmış boş repo şey işledin emin olun.

    git add . 
    git commit -m "new commit" 
    git push 
    

    İkincisi, git send-email doc söz etmez:

    --subject=<string> 
    

    Specify the initial subject of the email thread. Only necessary if --compose is also set.

    --compose kullandığınızdan emin olun. Bir .patch değil kaynak kendisiyle çalışacak

    This format expects the first line of the file to contain the " Cc: " value and the " Subject: " of the message as the second line.

    .
    Daha kapsamlı bir örnek için "How to send patches with git-send-email" git format-patch ve gör: Geçen İçin

    taahhüt:

    git send-email -1 [email protected] --subject="[asdasdas] assd asdasd" 
    

    Üçüncü olarak, daha basit bir çözüm use git bundle olacaktır. Bu, herhangi bir şekilde gönderebileceğiniz ve alıcının çekebileceği/klonlayabildiği bir dosyası üretir. Bu (bir dosya) çıplak git repo gibi davranır.

    +0

    Daha sonra http://status.bitbucket.org/git gönderim-e-postası -1 'çalışmam gerekir. Ama 'git bundle' daha kolay. – VonC

    +0

    Evet, e-postayı gönderebiliyorum ancak konu satırına girdiğim şey değil - -subject, git commit -m satırında değişiyor hat -m "line" – Haswell

    +0

    Ayrıca konu satırına bir [patch] ekleniyor . Git bundle bunu çözecek mi? – Haswell

    İlgili konular