Capistrano. Git dizini yüklenenler

0 Cevap php

Ben capistrano ile budala kullanıyorum.

Ben gibi benim yerel makinede benim klasörün içinde benim proje başlatıldı:

git init

I then pushed the project the server directory I then called cap deploy The deploy works, except that it uploads the local .git folder structure, as well as my .gitignore and Capfile to a publicly accessible folder.

İşte benim gitignore dosyasıdır:

.DS_Store
uploads/**/*
Capfile
.gitignore
.git/**/*

Bu hile yapmak için görünmüyor. Herhangi bir yardım?

Teşekkürler!


Edit:. Güncellendi gitignore dosyası:

Ihracat dağıtım stratejisini değiştirdi:

set :deploy_via, :export

Bu. Git klasörü görmezden için çalışır, ancak aşağıda görülebilir benim. Gitignore dosyasının içeriği hala dikkate alınmaz

.DS_Store
includes/php/config.php
/uploads
Capfile
.git





EDIT 2 (Solution): Edit 1 in combination with the following did the trick. Files that were already added prior to being listed in the .gitignore file would constantly be uploaded. Say I had the following .gitignore file.

.DS_Store
includes/php/config.php

Sonra aşağıdaki komutları koştu:

git add .
git commit -a -m 'some commit'

. Sonra ben artık bu gibi görünüyor bu yüzden benim gitignore dosyasına eklemek için karar verdi:

.DS_Store
includes/php/config.php
Capfile

Sonra tekrar, koştum:

git add .
git commit -a -m 'another commit'

Now I'd see that .DS_Store and includes/php/config.php have not been uploaded, but that the Capfile has... This is what happened to me in my original question. The reason: I think the .gitignore file is taken into account only when adding (i.e. git add .). If I already added files, then put them in the .gitignore file, they would have already been added to the project. I'd need to use the git rm command to remove them. I just started anew with a new .git repo and that solved the problem, but you don't have to - you can just remove whatever files you already added but now want to ignore with the git rm command.

Komple çözüm sadece yukarıda ayrıntılı gerçi, bana doğru biri olarak bu sonuca ulaşmak yardımcı cevabı seçildi.

0 Cevap