2011-05-12 4 views
1

나는 최근에 자식 서브 모듈을 없애는 과정에있었습니다. 때로는 하위 모듈이 있던 곳에 새 파일을 추가하려고합니다.git 하위 모듈을 vendored 코드로 대체하는 방법은 무엇입니까?

하위 모듈을 삭제하고 사용자를 끌어 오기위한 병합 문제를 만들지 않고 파일을 추가하는 좋은 방법을 찾고 있습니다. 여기

내가 무슨 말을하는지입니다 :

이것을 내가 교체로 일부 파일 서브 모듈 정의를 제거하고 추가 한 경우 커밋입니다 :

$:~/src/github/huerlisi/mailyt$ git show d1e7e1276fdccb37f775c8f656077e490a0b7be8 
commit d1e7e1276fdccb37f775c8f656077e490a0b7be8 
Author: Simon Hürlimann (CyT) <[email protected]> 
Date: Wed May 11 22:07:49 2011 +0200 

    Vendor in formtastic sass, drop git submodule. 

diff --git a/.gitmodules b/.gitmodules 
index 24f8f38..e6177d1 100644 
--- a/.gitmodules 
+++ b/.gitmodules 
@@ -1,6 +1,3 @@ 
[submodule "vendor/plugins/fetcher"] 
     path = vendor/plugins/fetcher 
     url = git://github.com/huerlisi/fetcher.git 
-[submodule "app/stylesheets/partials/formtastic"] 
-  path = app/stylesheets/partials/formtastic 
-  url = git://github.com/activestylus/formtastic-sass.git 
diff --git a/app/stylesheets/partials/formtastic b/app/stylesheets/partials/formtastic 
deleted file mode 160000 
index 1b920cb..0000000 
--- a/app/stylesheets/partials/formtastic 
+++ /dev/null 
@@ -1 +0,0 @@ 
-Subproject commit 1b920cb2db627cb7cf11cf4d3cea373a774a6fd3 
diff --git a/app/stylesheets/partials/formtastic/_formtastic_base.sass b/app/stylesheets/partials/formtastic/_formtastic_base.sass 
new file mode 100644 
index 0000000..b01ac8e 
--- /dev/null 
+++ b/app/stylesheets/partials/formtastic/_formtastic_base.sass 
@@ -0,0 +1,652 @@ 
+// 
+// FORMTASTIC SASS 
+// Flexible styling for formtastic forms 

이 내 작업 디렉토리에 커밋 병합을 서브 모듈은 체크 아웃이 오류 제공 :

~/src/github/huerlisi/mailyt$ git pull 
remote: Counting objects: 35, done. 
remote: Compressing objects: 100% (23/23), done. 
remote: Total 24 (delta 16), reused 0 (delta 0) 
Unpacking objects: 100% (24/24), done. 
From github.com:huerlisi/mailyt 
    2d055d6..82a45be master  -> origin/master 
* [new branch]  notmuch -> origin/notmuch 
Updating 2d055d6..82a45be 
error: The following untracked working tree files would be overwritten by merge: 
     app/stylesheets/partials/formtastic/_formtastic_base.sass 
Please move or remove them before you can merge. 
Aborting 

수동으로 작업을 병합하기 전에 응용 프로그램/스타일/파셜이/formtastic 디렉토리를 제거합니다. 그러나 나는 동료 코더들이 단순히 코드를 풀고 코드화 할 수 있기를 바란다.

답변

2

당신이 당신 편으로 그들을 위해 할 수있는 것은 아무것도 없습니다. 하위 모듈은 참조 로그와 rerere 기록이있는 전체 저장소이므로 끌어 오기는 제거되지 않습니다. 어느 쪽도 병합되지 않습니다. 그들은에서 변경 사항을 얻을 때 명시 적으로 그들은 rm -rf를 수행해야합니다.이 실수 등이

+0

잘하는 데 도움이

희망 업무 및/또는 심판 로그를 닦아 사람들을 저장하는 디자인입니다, 너 내가 기대했던 것을 말해 줘. 나는 여전히 못생긴 해킹이 일어나기를 바라고있다. 그래서 나는 당신의 대답을 마침내 받아 들일 때까지 기다려야 할 것이다. (그들은 메신저를 쏘지 말고, 그들이 말하기를 :-) –

+1

그들이 복제하도록 강요한다. 기존 repo의 변경 사항을 병합 할 수 있습니다. 그 리포지스에 서브 모듈이 존재하지 않고 그 문제를 피할 수있다. –

+0

서브 모듈을 보듯이 (특히 드롭시키는) 리포 옆에 추가적인 통신 채널이 필요하다. 그러면 그렇게 해:-) –

관련 문제