Rails 3 projesine bazı Rakip 3 projelerineGit altmodülünden kurtulma
git clone git://github.com/psynix/rails3_haml_scaffold_generator.git lib/generators/haml
ekledim, sadece bu dosyaların bir kısmını düzenlemeye çalıştığımda bu bir alt modüldüm. lib/generators/haml
dizini. Şimdi her git status
,
# On branch master
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: lib/generators/haml
#
no changes added to commit (use "git add" and/or "git commit -a")
olsun ama git add lib/generators/haml
'un bir etkisi yok. Ben sadece bir altmodule değil, dosyalara sahip olmak istiyorum, ama altmodülü bulmak imkansız olanı buluyorum:
> git rm --cached lib/generators/haml
rm 'lib/generators/haml'
> git status
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# deleted: lib/generators/haml
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# lib/generators/
> git commit -m "Removed submodule"
[master 02ae4c7] Removed submodule
1 files changed, 0 insertions(+), 1 deletions(-)
delete mode 160000 lib/generators/haml
> git status
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# lib/generators/
nothing added to commit but untracked files present (use "git add" to track)
> git add lib/generators/haml
> git status
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# new file: lib/generators/haml
#
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: lib/generators/haml
> git commit -m "Re-added lib/generators/haml"
[master c966912] Re-added lib/generators/haml
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 160000 lib/generators/haml
> git status
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: lib/generators/haml
Ek git add
s işe yaramaz. Xzx101'i deneyebilirim,
fatal: git rm: 'lib/generators/haml': Operation not permitted
olsun Sadece ölmeyecek! Ben how to delete submodules baktım, ama bu durumda, .submodules
dosyası yok, .git/config
'te alt modülden bahsediliyor. Yine de git submodule update
'ü çalıştırırsam,
No submodule mapping found in .gitmodules for path 'lib/generators/haml'
dizinini sildim ama aynı sonuçları elde ediyorum! Neler oluyor? Altmodülü silmek için .gitmodules
dosyası oluşturmam gerekiyor mu?
Teşekkürler, '.gitignore' ekleyerek iyi bir fikirdi. –
Ancak bu yeni dosyaları repo, FYI – andho
içine itmiyor, benim sorun ilgisiz olduğu ortaya çıktı, ancak bu yardımcı oldu. –