-
Notifications
You must be signed in to change notification settings - Fork 1
/
git submodule_ _already exists in the index_ - Stack Overflow.html
2399 lines (1990 loc) · 137 KB
/
git submodule_ _already exists in the index_ - Stack Overflow.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<!-- saved from url=(0118)http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index -->
<html itemscope="" itemtype="http://schema.org/QAPage"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Issue with adding common code as git submodule: "already exists in the index" - Stack Overflow</title>
<link rel="shortcut icon" href="https://cdn.sstatic.net/Sites/stackoverflow/img/favicon.ico?v=4f32ecc8f43d">
<link rel="apple-touch-icon image_src" href="https://cdn.sstatic.net/Sites/stackoverflow/img/apple-touch-icon.png?v=c78bd457575a">
<link rel="search" type="application/opensearchdescription+xml" title="Stack Overflow" href="http://stackoverflow.com/opensearch.xml">
<meta name="twitter:card" content="summary">
<meta name="twitter:domain" content="stackoverflow.com">
<meta property="og:type" content="website">
<meta property="og:image" itemprop="image primaryImageOfPage" content="https://cdn.sstatic.net/Sites/stackoverflow/img/apple-touch-icon@2.png?v=73d79a89bded">
<meta name="twitter:title" property="og:title" itemprop="title name" content="Issue with adding common code as git submodule: "already exists in the index"">
<meta name="twitter:description" property="og:description" itemprop="description" content="I'm new to git and would appreciate help with adding submodules.
I've received two projects sharing some common code. The shared code was just copied into the two projects. I created a separate git...">
<meta property="og:url" content="http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index">
<link rel="canonical" href="http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index">
<script async="" src="./git submodule_ _already exists in the index_ - Stack Overflow_files/quant.js.download"></script><script async="" src="./git submodule_ _already exists in the index_ - Stack Overflow_files/beacon.js.download"></script><script async="" src="./git submodule_ _already exists in the index_ - Stack Overflow_files/analytics.js.download"></script><script type="text/javascript" async="" src="./git submodule_ _already exists in the index_ - Stack Overflow_files/ados.js.download"></script><script src="./git submodule_ _already exists in the index_ - Stack Overflow_files/jquery.min.js.download"></script>
<script src="./git submodule_ _already exists in the index_ - Stack Overflow_files/stub.en.js.download"></script>
<link rel="stylesheet" type="text/css" href="./git submodule_ _already exists in the index_ - Stack Overflow_files/all.css">
<link rel="alternate" type="application/atom+xml" title="Feed for question 'Issue with adding common code as git submodule: "already exists in the index"'" href="http://stackoverflow.com/feeds/question/12898278">
<meta name="twitter:app:country" content="US">
<meta name="twitter:app:name:iphone" content="Stack Exchange iOS">
<meta name="twitter:app:id:iphone" content="871299723">
<meta name="twitter:app:url:iphone" content="se-zaphod://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index">
<meta name="twitter:app:name:ipad" content="Stack Exchange iOS">
<meta name="twitter:app:id:ipad" content="871299723">
<meta name="twitter:app:url:ipad" content="se-zaphod://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index">
<meta name="twitter:app:name:googleplay" content="Stack Exchange Android">
<meta name="twitter:app:url:googleplay" content="http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index">
<meta name="twitter:app:id:googleplay" content="com.stackexchange.marvin">
<script>
StackExchange.ready(function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.initSnippetRenderer();
});
StackExchange.using("postValidation", function () {
StackExchange.postValidation.initOnBlurAndSubmit($('#post-form'), 2, 'answer');
});
StackExchange.question.init({votesCast:[],autoShowCommentHelp:true,showAnswerHelp:true,totalCommentCount:4,shownCommentCount:4,highlightColor:'#F4A83D',backgroundColor:'#FFF',questionId:12898278});
styleCode();
StackExchange.realtime.subscribeToQuestion('1', '12898278');
StackExchange.using("gps", function () { StackExchange.gps.trackOutboundClicks('#content', '.post-text', true); });
});
</script>
<script>
StackExchange.init({"locale":"en","stackAuthUrl":"https://stackauth.com","networkMetaHostname":"meta.stackexchange.com","serverTime":1485958056,"routeName":"Questions/Show","site":{"name":"Stack Overflow","description":"Q&A for professional and enthusiast programmers","isNoticesTabEnabled":true,"recaptchaPublicKey":"6LdchgIAAAAAAJwGpIzRQSOFaO0pU6s44Xt8aTwc","recaptchaAudioLang":"en","enableNewTagCreationWarning":true,"insertSpaceAfterNameTabCompletion":false,"id":1,"enableInsertDocLinkDialog":true,"enableSocialMediaInSharePopup":true},"user":{"fkey":"584e2ec3e9535237f74210bfbca51dd6","rep":28,"isRegistered":true,"userType":3,"userId":6743883,"accountId":9055313,"gravatar":"<div class=\"gravatar-wrapper-32\"><img src=\"https://www.gravatar.com/avatar/3b329f2d0eaabbb0ac77cf51af1d4fbc?s=32&d=identicon&r=PG&f=1\" alt=\"\" width=\"32\" height=\"32\"></div>","profileUrl":"http://stackoverflow.com/users/6743883/carrotcake","canSeeDeletedPosts":false,"ab":{"question_show_tweaks":{"v":"altern_unansw_cta","g":2},"devstory_onboarding_exp":{"v":"h","g":2}}},"events":{"postType":{"question":1},"postEditionSection":{"title":1,"body":2,"tags":3}},"story":{"minCompleteBodyLength":75}}, {"site":{"allowImageUploads":true,"enableUserHovercards":true,"styleCode":true,"enableNewLinkInsertDialog":true,"enableImgurHttps":true},"comments":{},"userProfile":{"openGraphAPIKey":"58740831ad23540e00c58987"},"tags":{},"accounts":{"currentPasswordRequiredForChangingStackIdPassword":true},"flags":{"allowRetractingFlags":true},"analytics":{"clientTimingsAbsoluteTimeout":30000,"clientTimingsDebounceTimeout":1000},"snippets":{"snippetsEnabled":true,"renderDomain":"stacksnippets.net"},"markdown":{"asteriskIntraWordEmphasis":true}});
StackExchange.using.setCacheBreakers({"js/prettify-full.en.js":"ae27720681b4","js/moderator.en.js":"2c0576ff6fe7","js/full-anon.en.js":"456c38faea7b","js/full.en.js":"e57dce416394","js/wmd.en.js":"b5c45a6f17d6","js/third-party/jquery.autocomplete.min.js":"d3b8fa7fdf74","js/third-party/jquery.autocomplete.min.en.js":"","js/mobile.en.js":"8c3bd5e12250","js/help.en.js":"a56fdf9b9ff2","js/tageditor.en.js":"365e00f52f6a","js/tageditornew.en.js":"3142d1140061","js/inline-tag-editing.en.js":"2ddfa79492e7","js/revisions.en.js":"8f22ba768cac","js/review.en.js":"99bc693ab191","js/tagsuggestions.en.js":"d1ff9b84abe5","js/post-validation.en.js":"35fcf9b4a5f5","js/explore-qlist.en.js":"e71f14781288","js/events.en.js":"4421fed35644","js/keyboard-shortcuts.en.js":"c9a666328645","js/external-editor.en.js":"dec8b7cab79e","js/adops.en.js":"9a6a7812a212","js/external-editor.en.js":"dec8b7cab79e","js/snippet-javascript.en.js":"c681521379d1","js/snippet-javascript-codemirror.en.js":"ab55a7c301c9"});
StackExchange.using("gps", function() {
StackExchange.gps.init(true);
});
</script>
<script async="" src="./git submodule_ _already exists in the index_ - Stack Overflow_files/full.en.js.download"></script><script async="" src="./git submodule_ _already exists in the index_ - Stack Overflow_files/snippet-javascript.en.js.download"></script><script async="" src="./git submodule_ _already exists in the index_ - Stack Overflow_files/post-validation.en.js.download"></script><script async="" src="./git submodule_ _already exists in the index_ - Stack Overflow_files/external-editor.en.js.download"></script><script async="" src="./git submodule_ _already exists in the index_ - Stack Overflow_files/wmd.en.js.download"></script><style type="text/css"> .wmd-snippet-button span { background-position: 0 0; } .wmd-snippet-button:hover span { background-position: 0 -40px; }</style></head>
<body class="question-page new-topbar">
<noscript><div id="noscript-padding"></div></noscript>
<script>(function () { var old = $.fn.contents; $.fn.contents = function () { try { return old.apply(this, arguments); } catch (e) { return $([]); } } })()</script>
<iframe id="adzerk-user-match" width="0" height="0" frameborder="0" scrolling="no" onload="window.AUMIframeDone=true" src="./git submodule_ _already exists in the index_ - Stack Overflow_files/usermatch.html" style="display: none;" marginheight="0" marginwidth="0"></iframe>
<div id="notify-container"></div>
<div id="custom-header"></div>
<div class="topbar">
<div class="topbar-wrapper">
<div class="js-topbar-dialog-corral">
<div class="topbar-dialog siteSwitcher-dialog dno">
<div class="header">
<h3><a href="http://stackoverflow.com/">current community</a>
</h3>
</div>
<div class="modal-content current-site-container">
<ul class="current-site">
<li>
<div class="related-links">
<a href="http://chat.stackoverflow.com/" class="js-gps-track" data-gps-track="site_switcher.click({ item_type:6 })">chat</a>
<a href="http://stackoverflow.com/users/logout" class="js-gps-track" data-gps-track="site_switcher.click({ item_type:8 })">log out</a>
</div>
<a href="http://stackoverflow.com/" class="current-site-link site-link js-gps-track" data-id="1" data-gps-track="
site_switcher.click({ item_type:3 })">
<div class="site-icon favicon favicon-stackoverflow" title="Stack Overflow"></div>
Stack Overflow
</a>
</li>
<li class="related-site">
<div class="L-shaped-icon-container">
<span class="L-shaped-icon"></span>
</div>
<a href="http://meta.stackoverflow.com/" class="site-link js-gps-track" data-id="552" data-gps-track="
site.switch({ target_site:552, item_type:3 }),
site_switcher.click({ item_type:4 })">
<div class="site-icon favicon favicon-stackoverflowmeta" title="Meta Stack Overflow"></div>
Meta Stack Overflow
</a>
</li>
</ul>
</div>
<div class="header" id="your-communities-header">
<h3>
<a href="http://stackexchange.com/users/9055313/?tab=accounts">your communities</a>
</h3>
<a href="http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index#" id="edit-pinned-sites">edit</a>
<a href="http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index#" id="cancel-pinned-sites" style="display: none;">cancel</a>
</div>
<div class="modal-content" id="your-communities-section">
<ul class="my-sites">
<li>
<a href="http://stackoverflow.com/" class="site-link js-gps-track" data-id="1" data-gps-track="
site.switch({ target_site:1, item_type:3 }),
site_switcher.click({ item_type:1 })">
<div class="site-icon favicon favicon-stackoverflow" title="Stack Overflow"></div>
Stack Overflow
<span class="rep-score">28</span>
</a>
</li>
</ul>
<div class="pinned-site-editor-container" style="display: none;">
<input id="js-site-search-txt" type="text" class="site-filter-input" value="" placeholder="Add a Stack Exchange community">
<input type="submit" id="pin-site-btn" value="Add" disabled="disabled">
<ul class="js-found-sites found-sites"></ul>
<ul class="pinned-site-list sortable" data-custom-list="False">
</ul>
<input type="submit" value="Save" id="save-pinned-sites-btn" disabled="disabled">
<a href="http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index#" id="reset-pinned-sites">reset to default list</a>
</div>
</div>
<div class="header">
<h3><a href="http://stackexchange.com/sites">more stack exchange communities</a>
</h3>
<a href="http://stackoverflow.blog/" class="fr">company blog</a>
</div>
<div class="modal-content">
<div class="child-content"></div>
</div>
</div>
</div>
<div class="network-items">
<a href="http://stackexchange.com/" class="topbar-icon icon-site-switcher yes-hover js-site-switcher-button js-gps-track" data-gps-track="site_switcher.show" title="A list of all 163 Stack Exchange sites">
<span class="hidden-text">Stack Exchange</span>
</a>
<a href="http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index#" class="topbar-icon icon-inbox yes-hover js-inbox-button" title="Recent inbox messages">
<span class="hidden-text">Inbox</span>
<span class="unread-count" style="display:none"></span>
</a>
<a href="http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index#" class="topbar-icon icon-achievements yes-hover js-achievements-button" data-unread-class="" title="Recent achievements: reputation, badges, and privileges earned">
<span class="hidden-text">Reputation and Badges</span>
<span class="unread-count" style="display:none">
</span>
</a>
</div>
<div class="topbar-links">
<a href="http://stackoverflow.com/users/6743883/carrotcake" class="profile-me js-gps-track" data-gps-track="profile_summary.click()">
<div class="gravatar-wrapper-24" title="carrotcake"><img src="./git submodule_ _already exists in the index_ - Stack Overflow_files/3b329f2d0eaabbb0ac77cf51af1d4fbc" alt="" width="24" height="24" class="avatar-me js-avatar-me"></div>
<div class="links-container topbar-flair">
<span class="reputation" title="your reputation: 28">
28
</span>
<span title="7 bronze badges"><span class="badge3"></span><span class="badgecount">7</span></span> </div>
</a>
<div class="links-container">
<span class="topbar-menu-links">
<a href="http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index#" class="icon-help js-help-button" title="Help Center and other resources">
help
<span class="triangle"></span>
</a>
<div class="topbar-dialog help-dialog js-help-dialog dno">
<div class="modal-content">
<ul>
<li>
<a href="http://stackoverflow.com/tour" class="js-gps-track" data-gps-track="help_popup.click({ item_type:1 })">
Tour
<span class="item-summary">
Start here for a quick overview of the site
</span>
</a>
</li>
<li>
<a href="http://stackoverflow.com/help" class="js-gps-track" data-gps-track="help_popup.click({ item_type:4 })">
Help Center
<span class="item-summary">
Detailed answers to any questions you might have
</span>
</a>
</li>
<li>
<a href="http://meta.stackoverflow.com/" class="js-gps-track" data-gps-track="help_popup.click({ item_type:2 })">
Meta
<span class="item-summary">
Discuss the workings and policies of this site
</span>
</a>
</li>
<li>
<a href="http://stackoverflow.com/company/about" class="js-gps-track" data-gps-track="help_popup.click({ item_type:6 })">
About Us
<span class="item-summary">
Learn more about Stack Overflow the company
</span>
</a>
</li>
<li>
<a href="https://www.stackoverflowbusiness.com/?ref=topbar_help" class="js-gps-track" data-gps-track="help_popup.click({ item_type:7 })">
Business
<span class="item-summary">
Learn more about hiring developers or posting ads with us
</span>
</a>
</li>
</ul>
</div>
</div>
</span>
</div>
<div class="search-container">
<form id="search" action="http://stackoverflow.com/search" method="get" autocomplete="off">
<input name="q" type="text" placeholder="Search Q&A" value="" tabindex="1" autocomplete="off" maxlength="240">
</form>
</div>
</div>
</div>
</div>
<script>
StackExchange.ready(function() { StackExchange.topbar.init(); });
</script>
<div class="container">
<div id="header">
<br class="cbt">
<div id="hlogo">
<a href="http://stackoverflow.com/">
Stack Overflow
</a>
</div>
<div id="hmenus">
<div class="nav mainnavs">
<ul>
<li class="youarehere">
<a id="nav-questions" href="http://stackoverflow.com/questions" class="js-gps-track" data-gps-track="top_nav.click({is_current:true, location:2, destination:1})">
Questions
</a>
</li>
<li>
<a id="nav-jobs" href="http://stackoverflow.com/jobs?med=site-ui&ref=jobs-tab" class="js-gps-track" data-gps-track="top_nav.click({is_current:false, location:2, destination:6})">
Jobs
</a>
</li>
<li>
<a id="nav-docs" href="http://stackoverflow.com/documentation" class="js-gps-track" data-gps-track="top_nav.click({is_current:false, location:2, destination:7})">
Documentation
</a>
</li>
<li>
<a id="nav-tags" href="http://stackoverflow.com/tags" class="js-gps-track" data-gps-track="top_nav.click({is_current:false, location:2, destination:2})">
Tags
</a>
</li>
<li>
<a id="nav-users" href="http://stackoverflow.com/users" class="js-gps-track" data-gps-track="top_nav.click({is_current:false, location:2, destination:3})">
Users
</a>
</li>
<li>
<a id="nav-badges" href="http://stackoverflow.com/help/badges" class="js-gps-track" data-gps-track="top_nav.click({is_current:false, location:2, destination:4})">
Badges
</a>
</li>
</ul>
</div>
<div class="nav askquestion">
<ul>
<li>
<a id="nav-askquestion" href="http://stackoverflow.com/questions/ask">Ask Question</a>
</li>
</ul>
</div>
</div>
</div>
<div id="content" class="snippet-hidden">
<div itemscope="" itemtype="http://schema.org/Question">
<link itemprop="image" href="https://cdn.sstatic.net/Sites/stackoverflow/img/apple-touch-icon.png?v=c78bd457575a">
<div id="question-header">
<h1 itemprop="name"><a href="http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index" class="question-hyperlink">Issue with adding common code as git submodule: “already exists in the index”</a></h1>
</div>
<div id="mainbar">
<div class="question" data-questionid="12898278" id="question">
<script>
var ados = ados || {}; ados.run = ados.run || [];
ados.run.push(function () { ados_add_placement(22,8277,"adzerk950014425",4).setZone(43); });
</script>
<div class="everyonelovesstackoverflow" id="adzerk950014425"></div> <table>
<tbody><tr>
<td class="votecell">
<div class="vote">
<input type="hidden" name="_id_" value="12898278">
<a class="vote-up-off" title="This question shows research effort; it is useful and clear">up vote</a>
<span itemprop="upvoteCount" class="vote-count-post ">85</span>
<a class="vote-down-off" title="This question does not show any research effort; it is unclear or not useful">down vote</a>
<a class="star-off" href="http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index#" title="Click to mark as favorite question (click again to undo)">favorite</a>
<div class="favoritecount"><b>29</b></div>
</div>
</td>
<td class="postcell">
<div>
<div class="post-text" itemprop="text">
<p>I'm new to git and would appreciate help with adding submodules.
I've received two projects sharing some common code. The shared code was just copied into the two projects. I created a separate git repo for the common code and removed it from the projects with the plan to add it as a git submodule. </p>
<p>I used the path option of git submodule add to specify the folder:</p>
<pre><code>git submodule add url_to_repo projectfolder
</code></pre>
<p>but then got the error:</p>
<pre><code>'projectfolder' already exists in the index"
</code></pre>
<p>This is the desired structure of my repository:</p>
<pre><code>repo
|-- projectfolder
|-- folder with common code
</code></pre>
<p>It is possible to add the git submodule directly in the repo or into a new folder there, but not in the projectfolder. The problem is that it really need to be in the projectfolder..
What can I do about this and what have I misunderstood about the path option of git submodule add?</p>
</div>
<div class="post-taglist">
<a href="http://stackoverflow.com/questions/tagged/git" class="post-tag js-gps-track" title="show questions tagged 'git'" rel="tag">git</a> <a href="http://stackoverflow.com/questions/tagged/git-submodules" class="post-tag js-gps-track" title="show questions tagged 'git-submodules'" rel="tag">git-submodules</a>
</div>
<table class="fw">
<tbody><tr>
<td class="vt">
<div class="post-menu"><a href="http://stackoverflow.com/q/12898278/6743883" title="short permalink to this question" class="short-link" id="link-post-12898278">share</a><span class="lsep">|</span><a href="http://stackoverflow.com/posts/12898278/edit" class="suggest-edit-post" title="revise and improve this post">edit</a><span class="lsep">|</span><a href="http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index#" class="flag-post-link" title="flag this post for serious problems or moderator attention" data-postid="12898278">flag</a></div>
</td>
<td class="post-signature owner">
<div class="user-info ">
<div class="user-action-time">
asked <span title="2012-10-15 14:55:07Z" class="relativetime">Oct 15 '12 at 14:55</span>
</div>
<div class="user-gravatar32">
<a href="http://stackoverflow.com/users/419305/vanja"><div class="gravatar-wrapper-32"><img src="./git submodule_ _already exists in the index_ - Stack Overflow_files/250ebcc86a6ca24ec0a39bf049e06e17" alt="" width="32" height="32"></div></a>
</div>
<div class="user-details">
<a href="http://stackoverflow.com/users/419305/vanja">Vanja</a>
<div class="-flair">
<span class="reputation-score" title="reputation score " dir="ltr">1,150</span><span title="2 gold badges"><span class="badge1"></span><span class="badgecount">2</span></span><span title="15 silver badges"><span class="badge2"></span><span class="badgecount">15</span></span><span title="21 bronze badges"><span class="badge3"></span><span class="badgecount">21</span></span>
</div>
</div>
</div>
</td>
</tr>
</tbody></table>
</div>
</td>
</tr>
<tr>
<td class="votecell"></td>
<td>
<div id="comments-12898278" class="comments ">
<table>
<tbody data-remaining-comments-count="0" data-canpost="false" data-cansee="true" data-comments-unavailable="false" data-addlink-disabled="true">
<tr id="comment-17470250" class="comment ">
<td class="comment-actions">
<table>
<tbody>
<tr>
<td class=" comment-score">
</td>
<td>
<a class="comment-up comment-up-off" title="this comment adds something useful to the post">upvote</a>
</td>
</tr>
<tr>
<td> </td>
<td>
<a class="comment-flag" title="Flag this comment for serious problems or moderator attention">flag</a>
</td>
</tr>
</tbody>
</table>
</td>
<td class="comment-text">
<div style="display: block;" class="comment-body">
<span class="comment-copy">What do you get if you do <code>git ls-files --stage projectfolder</code>?</span>
– <a href="http://stackoverflow.com/users/223092/mark-longair" title="195,945 reputation" class="comment-user">Mark Longair</a>
<span class="comment-date" dir="ltr"><a class="comment-link" href="http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index#comment17470250_12898278"><span title="2012-10-15 15:14:46Z" class="relativetime-clean">Oct 15 '12 at 15:14</span></a></span>
</div>
</td>
</tr>
<tr id="comment-17486465" class="comment ">
<td class="comment-actions">
<table>
<tbody>
<tr>
<td class=" comment-score">
</td>
<td>
<a class="comment-up comment-up-off" title="this comment adds something useful to the post">upvote</a>
</td>
</tr>
<tr>
<td> </td>
<td>
<a class="comment-flag" title="Flag this comment for serious problems or moderator attention">flag</a>
</td>
</tr>
</tbody>
</table>
</td>
<td class="comment-text">
<div style="display: block;" class="comment-body">
<span class="comment-copy">I get a list with all content starting with 100644.</span>
– <a href="http://stackoverflow.com/users/419305/vanja" title="1,150 reputation" class="comment-user owner">Vanja</a>
<span class="comment-date" dir="ltr"><a class="comment-link" href="http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index#comment17486465_12898278"><span title="2012-10-16 05:55:43Z" class="relativetime-clean">Oct 16 '12 at 5:55</span></a></span>
</div>
</td>
</tr>
<tr id="comment-62221866" class="comment ">
<td class="comment-actions">
<table>
<tbody>
<tr>
<td class=" comment-score">
</td>
<td>
<a class="comment-up comment-up-off" title="this comment adds something useful to the post">upvote</a>
</td>
</tr>
<tr>
<td> </td>
<td>
<a class="comment-flag" title="Flag this comment for serious problems or moderator attention">flag</a>
</td>
</tr>
</tbody>
</table>
</td>
<td class="comment-text">
<div style="display: block;" class="comment-body">
<span class="comment-copy">related: <a href="http://stackoverflow.com/questions/12696919/cant-add-existing-git-repository-into-new-repository/37336838#37336838" title="cant add existing git repository into new repository">stackoverflow.com/questions/12696919/…</a></span>
– <a href="http://stackoverflow.com/users/2172260/julio-marins" title="2,865 reputation" class="comment-user">Julio Marins</a>
<span class="comment-date" dir="ltr"><a class="comment-link" href="http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index#comment62221866_12898278"><span title="2016-05-20 18:09:25Z" class="relativetime-clean">May 20 '16 at 18:09</span></a></span>
</div>
</td>
</tr>
<tr id="comment-66513888" class="comment ">
<td class="comment-actions">
<table>
<tbody>
<tr>
<td class=" comment-score">
</td>
<td>
<a class="comment-up comment-up-off" title="this comment adds something useful to the post">upvote</a>
</td>
</tr>
<tr>
<td> </td>
<td>
<a class="comment-flag" title="Flag this comment for serious problems or moderator attention">flag</a>
</td>
</tr>
</tbody>
</table>
</td>
<td class="comment-text">
<div style="display: block;" class="comment-body">
<span class="comment-copy">for me doing a <code>git rm</code> on the existing folder helped :|</span>
– <a href="http://stackoverflow.com/users/32453/rogerdpack" title="23,847 reputation" class="comment-user">rogerdpack</a>
<span class="comment-date" dir="ltr"><a class="comment-link" href="http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index#comment66513888_12898278"><span title="2016-09-20 19:54:42Z" class="relativetime-clean">Sep 20 '16 at 19:54</span></a></span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="comments-link-12898278" data-rep="50" data-reg="true">
<a class="js-add-link comments-link disabled-link " title="Use comments to ask for more information or suggest improvements. Avoid answering questions in comments.">add a comment</a><span class="js-link-separator dno"> | </span>
<a class="js-show-link comments-link dno" title="expand to show all comments on this post" href="http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index#" onclick=""></a>
</div>
</td>
</tr> </tbody></table>
</div>
<div id="answers">
<a name="tab-top"></a>
<div id="answers-header">
<div class="subheader answers-subheader">
<h2>
7 Answers
<span style="display:none;" itemprop="answerCount">7</span>
</h2>
<div>
<div id="tabs">
<a href="http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index?answertab=active#tab-top" data-nav-xhref="" title="Answers with the latest activity first" data-value="active" data-shortcut="A">
active</a>
<a href="http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index?answertab=oldest#tab-top" data-nav-xhref="" title="Answers in the order they were provided" data-value="oldest" data-shortcut="O">
oldest</a>
<a class="youarehere" href="http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index?answertab=votes#tab-top" data-nav-xhref="" title="Answers with the highest score first" data-value="votes" data-shortcut="V">
votes</a>
</div>
</div>
</div>
</div>
<a name="12902857"></a>
<div id="answer-12902857" class="answer" data-answerid="12902857" itemscope="" itemtype="http://schema.org/Answer">
<table>
<tbody><tr>
<td class="votecell">
<div class="vote">
<input type="hidden" name="_id_" value="12902857">
<a class="vote-up-off vote-up-on" title="This answer is useful (click again to undo)">up vote</a>
<span itemprop="upvoteCount" class="vote-count-post ">157</span>
<a class="vote-down-off" title="This answer is not useful">down vote</a>
</div>
</td>
<td class="answercell">
<div class="post-text" itemprop="text">
<p><em>I'm afraid there's not enough information in your question to be certain about what's going on, since you haven't replied to my follow-up question, but this may be of help in any case.</em></p>
<p>That error means that <code>projectfolder</code> is already staged ("already exists in the index"). To find out what's going on here, try to list everything in the index under that folder with:</p>
<pre><code>git ls-files --stage projectfolder
</code></pre>
<p>The first column of that output will tell you what type of object is in the index at <code>projectfolder</code>. (These look like Unix filemodes, but have special meanings in git.)</p>
<p>I suspect that you will see something like:</p>
<pre><code>160000 d00cf29f23627fc54eb992dde6a79112677cd86c 0 projectfolder
</code></pre>
<p>(i.e. a line beginning with <code>160000</code>), in which case the repository in <code>projectfolder</code> has already been added as a "gitlink". If it doesn't appear in the output of <code>git submodule</code>, and you want to re-add it as a submodule, you can do:</p>
<pre><code>git rm --cached projectfolder
</code></pre>
<p>... to unstage it, and then:</p>
<pre><code>git submodule add url_to_repo projectfolder
</code></pre>
<p>... to add the repository as a submodule.</p>
<p>However, it's also possible that you will see many blobs listed (with file modes <code>100644</code> and <code>100755</code>), which would suggest to me that you didn't properly unstage the files in <code>projectfolder</code> before copying the new repository into place. If that's the case, you can do the following to unstage all of those files:</p>
<pre><code>git rm -r --cached projectfolder
</code></pre>
<p>... and then add the submodule with:</p>
<pre><code>git submodule add url_to_repo projectfolder
</code></pre>
</div>
<table class="fw">
<tbody><tr>
<td class="vt">
<div class="post-menu"><a href="http://stackoverflow.com/a/12902857/6743883" title="short permalink to this answer" class="short-link" id="link-post-12902857">share</a><span class="lsep">|</span><a href="http://stackoverflow.com/posts/12902857/edit" class="suggest-edit-post" title="revise and improve this post">edit</a><span class="lsep">|</span><a href="http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index#" class="flag-post-link" title="flag this post for serious problems or moderator attention" data-postid="12902857">flag</a></div> </td>
<td align="right" class="post-signature">
<div class="user-info user-hover">
<div class="user-action-time">
answered <span title="2012-10-15 19:43:00Z" class="relativetime">Oct 15 '12 at 19:43</span>
</div>
<div class="user-gravatar32">
<a href="http://stackoverflow.com/users/223092/mark-longair"><div class="gravatar-wrapper-32"><img src="./git submodule_ _already exists in the index_ - Stack Overflow_files/71c4accacd83e0e6d2193e0da83dd3aa" alt="" width="32" height="32"></div></a>
</div>
<div class="user-details">
<a href="http://stackoverflow.com/users/223092/mark-longair">Mark Longair</a>
<div class="-flair">
<span class="reputation-score" title="reputation score 195,945" dir="ltr">196k</span><span title="45 gold badges"><span class="badge1"></span><span class="badgecount">45</span></span><span title="304 silver badges"><span class="badge2"></span><span class="badgecount">304</span></span><span title="276 bronze badges"><span class="badge3"></span><span class="badgecount">276</span></span>
</div>
</div>
</div>
</td>
</tr>
</tbody></table>
</td>
</tr>
<tr>
<td class="votecell"></td>
<td>
<div id="comments-12902857" class="comments ">
<table>
<tbody data-remaining-comments-count="1" data-canpost="false" data-cansee="true" data-comments-unavailable="false" data-addlink-disabled="true">
<tr id="comment-17486498" class="comment ">
<td class="comment-actions">
<table>
<tbody>
<tr>
<td class=" comment-score">
<span title="number of 'useful comment' votes received" class="cool">4</span>
</td>
<td>
<a class="comment-up comment-up-off" title="this comment adds something useful to the post">upvote</a>
</td>
</tr>
<tr>
<td> </td>
<td>
<a class="comment-flag" title="Flag this comment for serious problems or moderator attention">flag</a>
</td>
</tr>
</tbody>
</table>
</td>
<td class="comment-text">
<div style="display: block;" class="comment-body">
<span class="comment-copy">Thank Mark for your detailed answer. I did a "git rm -r --cached projectfolder" and tried to att the submodule again. However this time I get the error rmessage "'projectfolder' already exists and is not a valid git repo".</span>
– <a href="http://stackoverflow.com/users/419305/vanja" title="1,150 reputation" class="comment-user owner">Vanja</a>
<span class="comment-date" dir="ltr"><a class="comment-link" href="http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index#comment17486498_12902857"><span title="2012-10-16 05:58:04Z" class="relativetime-clean">Oct 16 '12 at 5:58</span></a></span>
</div>
</td>
</tr>
<tr id="comment-17495201" class="comment ">
<td class="comment-actions">
<table>
<tbody>
<tr>
<td class=" comment-score">
<span title="number of 'useful comment' votes received" class="cool">2</span>
</td>
<td>
<a class="comment-up comment-up-off" title="this comment adds something useful to the post">upvote</a>
</td>
</tr>
<tr>
<td> </td>
<td>
<a class="comment-flag" title="Flag this comment for serious problems or moderator attention">flag</a>
</td>
</tr>
</tbody>
</table>
</td>
<td class="comment-text">
<div style="display: block;" class="comment-body">
<span class="comment-copy">@Vanja: That indicates that <code>projectfolder</code> didn't contain a <code>.git</code> directory. It sounded from your question as if you'd created the new repository for <code>projectfolder</code> elsewhere, and copied it into place, but clearly that wasn't the case. You'd need to move the existing <code>projectfolder</code> out of the way, and then copy the new repository (complete with its <code>.git</code> directory) into place before adding as a submodule. Or, if you've already pushed it to the repository represented by <code>url_to_repo</code>, you could just move <code>projectfolder</code> out of the way and then add the submodule from that URL.</span>
– <a href="http://stackoverflow.com/users/223092/mark-longair" title="195,945 reputation" class="comment-user">Mark Longair</a>
<span class="comment-date" dir="ltr"><a class="comment-link" href="http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index#comment17495201_12902857"><span title="2012-10-16 11:42:14Z" class="relativetime-clean">Oct 16 '12 at 11:42</span></a></span>
</div>
</td>
</tr>
<tr id="comment-24537727" class="comment ">
<td class="comment-actions">
<table>
<tbody>
<tr>
<td class=" comment-score">
</td>
<td>
<a class="comment-up comment-up-off" title="this comment adds something useful to the post">upvote</a>
</td>
</tr>
<tr>
<td> </td>
<td>
<a class="comment-flag" title="Flag this comment for serious problems or moderator attention">flag</a>
</td>
</tr>
</tbody>
</table>
</td>
<td class="comment-text">
<div style="display: block;" class="comment-body">
<span class="comment-copy">awesome answer +1 all the way</span>
– <a href="http://stackoverflow.com/users/766570/abbood" title="13,026 reputation" class="comment-user">abbood</a>
<span class="comment-date" dir="ltr"><a class="comment-link" href="http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index#comment24537727_12902857"><span title="2013-06-07 13:57:01Z" class="relativetime-clean">Jun 7 '13 at 13:57</span></a></span>
</div>
</td>
</tr>
<tr id="comment-24538373" class="comment ">
<td class="comment-actions">
<table>
<tbody>
<tr>
<td class=" comment-score">
</td>
<td>
<a class="comment-up comment-up-off" title="this comment adds something useful to the post">upvote</a>
</td>
</tr>
<tr>
<td> </td>
<td>
<a class="comment-flag" title="Flag this comment for serious problems or moderator attention">flag</a>
</td>
</tr>
</tbody>
</table>
</td>
<td class="comment-text">
<div style="display: block;" class="comment-body">
<span class="comment-copy">Thanks, @abbood!</span>
– <a href="http://stackoverflow.com/users/223092/mark-longair" title="195,945 reputation" class="comment-user">Mark Longair</a>
<span class="comment-date" dir="ltr"><a class="comment-link" href="http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index#comment24538373_12902857"><span title="2013-06-07 14:13:32Z" class="relativetime-clean">Jun 7 '13 at 14:13</span></a></span>
</div>
</td>
</tr>
<tr id="comment-33815521" class="comment ">
<td class="comment-actions">
<table>
<tbody>
<tr>
<td class=" comment-score">
</td>
<td>
<a class="comment-up comment-up-off" title="this comment adds something useful to the post">upvote</a>
</td>
</tr>
<tr>
<td> </td>
<td>
<a class="comment-flag" title="Flag this comment for serious problems or moderator attention">flag</a>
</td>
</tr>
</tbody>
</table>
</td>
<td class="comment-text">
<div style="display: block;" class="comment-body">
<span class="comment-copy">This helped me a ton. Thank you!</span>
– <a href="http://stackoverflow.com/users/47593/evan-moran" title="2,082 reputation" class="comment-user">Evan Moran</a>
<span class="comment-date" dir="ltr"><a class="comment-link" href="http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index#comment33815521_12902857"><span title="2014-03-07 23:31:38Z" class="relativetime-clean">Mar 7 '14 at 23:31</span></a></span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="comments-link-12902857" data-rep="50" data-reg="true">
<a class="js-add-link comments-link dno" title="Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”."></a><span class="js-link-separator dno"> | </span>
<a class="js-show-link comments-link " title="expand to show all comments on this post" href="http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index#" onclick="">show <b>1</b> more comment</a>
</div>
</td>
</tr> </tbody></table>
</div>
<script>
var ados = ados || {}; ados.run = ados.run || [];
ados.run.push(function () { ados_add_placement(22,8277,"adzerk882987511",4).setZone(44); });
</script>
<div class="everyonelovesstackoverflow" id="adzerk882987511"></div>
<a name="14815959"></a>
<div id="answer-14815959" class="answer" data-answerid="14815959" itemscope="" itemtype="http://schema.org/Answer">
<table>
<tbody><tr>
<td class="votecell">
<div class="vote">
<input type="hidden" name="_id_" value="14815959">
<a class="vote-up-off" title="This answer is useful">up vote</a>
<span itemprop="upvoteCount" class="vote-count-post ">24</span>
<a class="vote-down-off" title="This answer is not useful">down vote</a>
</div>
</td>
<td class="answercell">
<div class="post-text" itemprop="text">
<p>I had the same problem and after hours of looking found the answer. </p>
<p>The error I was getting was a little different: <code><path> already exists and is not a valid git repo</code> (and added here for SEO value)</p>
<p>The solution is to NOT create the directory that will house the submodule. The directory will be created as part of the <code>git submodule add</code> command. </p>
<p>Also, the argument is expected to be relative to the parent-repo root, not your working directory, so watch out for that. </p>
<p>Solution for the example above:</p>
<ol>
<li>It IS okay to have your parent repo already cloned.</li>
<li>Make sure the <code>common_code</code> directory does <strong>not</strong> exist.</li>
<li><code>cd Repo</code></li>
<li><code>git submodule add git://url_to_repo projectfolder/common_code/</code> (<em>Note the required trailing slash.</em>)</li>
<li>Sanity restored.</li>
</ol>
<p>I hope this helps someone, as there is very little information to be found elsewhere about this.</p>
</div>
<table class="fw">
<tbody><tr>
<td class="vt">
<div class="post-menu"><a href="http://stackoverflow.com/a/14815959/6743883" title="short permalink to this answer" class="short-link" id="link-post-14815959">share</a><span class="lsep">|</span><a href="http://stackoverflow.com/posts/14815959/edit" class="suggest-edit-post" title="revise and improve this post">edit</a><span class="lsep">|</span><a href="http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index#" class="flag-post-link" title="flag this post for serious problems or moderator attention" data-postid="14815959">flag</a></div> </td>
<td align="right" class="post-signature">
<div class="user-info ">
<div class="user-action-time">
<a href="http://stackoverflow.com/posts/14815959/revisions" title="show all edits to this post">edited <span title="2013-07-09 16:56:05Z" class="relativetime">Jul 9 '13 at 16:56</span></a>
</div>
<div class="user-gravatar32">
</div>
<div class="user-details">
<div class="-flair">
</div>
</div>
</div> </td>
<td align="right" class="post-signature">
<div class="user-info ">
<div class="user-action-time">
answered <span title="2013-02-11 16:04:35Z" class="relativetime">Feb 11 '13 at 16:04</span>
</div>
<div class="user-gravatar32">
<a href="http://stackoverflow.com/users/338464/shelton"><div class="gravatar-wrapper-32"><img src="./git submodule_ _already exists in the index_ - Stack Overflow_files/af8da95616dd6b0db3462bdadfec738a" alt="" width="32" height="32"></div></a>
</div>
<div class="user-details">
<a href="http://stackoverflow.com/users/338464/shelton">Shelton</a>
<div class="-flair">
<span class="reputation-score" title="reputation score " dir="ltr">442</span><span title="4 silver badges"><span class="badge2"></span><span class="badgecount">4</span></span><span title="12 bronze badges"><span class="badge3"></span><span class="badgecount">12</span></span>
</div>
</div>
</div>
</td>
</tr>
</tbody></table>
</td>
</tr>
<tr>
<td class="votecell"></td>
<td>
<div id="comments-14815959" class="comments ">
<table>
<tbody data-remaining-comments-count="0" data-canpost="false" data-cansee="true" data-comments-unavailable="false" data-addlink-disabled="true">
<tr id="comment-22040568" class="comment ">
<td class="comment-actions">
<table>
<tbody>
<tr>
<td class=" comment-score">
<span title="number of 'useful comment' votes received" class="cool">1</span>
</td>
<td>
<a class="comment-up comment-up-off" title="this comment adds something useful to the post">upvote</a>
</td>
</tr>
<tr>
<td> </td>
<td>
<a class="comment-flag" title="Flag this comment for serious problems or moderator attention">flag</a>
</td>
</tr>
</tbody>
</table>
</td>
<td class="comment-text">
<div style="display: block;" class="comment-body">
<span class="comment-copy">Step 4 should begin <code>git submodule add</code>, and the trailing slash isn't required.</span>
– <a href="http://stackoverflow.com/users/866016/nullability" title="7,098 reputation" class="comment-user">nullability</a>
<span class="comment-date" dir="ltr"><a class="comment-link" href="http://stackoverflow.com/questions/12898278/issue-with-adding-common-code-as-git-submodule-already-exists-in-the-index#comment22040568_14815959"><span title="2013-03-21 16:41:26Z" class="relativetime-clean">Mar 21 '13 at 16:41</span></a></span>
</div>
</td>
</tr>
<tr id="comment-25534603" class="comment ">
<td class="comment-actions">
<table>
<tbody>
<tr>
<td class=" comment-score">
</td>