0

Currently i'm working with yii2, tfs. I need to migrate to my own git server.

local git server has been set up

now I git init my local yii2 project

now git status return all untracked file.

then I git add .

then I check git status but it give me

$ git status
On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)
  (commit or discard the untracked or modified content in submodules)

        modified:   vendor/kartik-v/yii2-date-range (untracked content)
        modified:   vendor/kartik-v/yii2-grid (untracked content)
        modified:   vendor/kartik-v/yii2-widget-depdrop (modified content)
        modified:   vendor/kartik-v/yii2-widget-fileinput (untracked content)

no changes added to commit (use "git add" and/or "git commit -a")

I don't know what is that as I don't make change to those file

there is many package in vendor, but just thus which remain untracked and modified.

then I commit as hint says but it give me

$ git commit -m "a"
On branch master
Changes not staged for commit:
        modified:   vendor/kartik-v/yii2-date-range (untracked content)
        modified:   vendor/kartik-v/yii2-grid (untracked content)
        modified:   vendor/kartik-v/yii2-widget-depdrop (modified content)
        modified:   vendor/kartik-v/yii2-widget-fileinput (untracked content)
no changes added to commit

and I check git status again the file remain untracked and modified

run git diff and I get this

$ git diff
diff --git a/vendor/kartik-v/yii2-date-range b/vendor/kartik-v/yii2-date-range
--- a/vendor/kartik-v/yii2-date-range
+++ b/vendor/kartik-v/yii2-date-range
@@ -1 +1 @@
-Subproject commit c7177cd89cc90772acc96a05fbf5996f67127e4c
+Subproject commit c7177cd89cc90772acc96a05fbf5996f67127e4c-dirty
diff --git a/vendor/kartik-v/yii2-grid b/vendor/kartik-v/yii2-grid
--- a/vendor/kartik-v/yii2-grid
+++ b/vendor/kartik-v/yii2-grid
@@ -1 +1 @@
-Subproject commit fe29bcf8f46bde42aa3eb067851b38dc07cd4d8a
+Subproject commit fe29bcf8f46bde42aa3eb067851b38dc07cd4d8a-dirty
diff --git a/vendor/kartik-v/yii2-widget-depdrop b/vendor/kartik-v/yii2-widget-depdrop
--- a/vendor/kartik-v/yii2-widget-depdrop
+++ b/vendor/kartik-v/yii2-widget-depdrop
@@ -1 +1 @@
-Subproject commit 6918ca6f7d7be153c80f6aa9c261f9b333293e9c
+Subproject commit 6918ca6f7d7be153c80f6aa9c261f9b333293e9c-dirty
diff --git a/vendor/kartik-v/yii2-widget-fileinput b/vendor/kartik-v/yii2-widget-fileinput
--- a/vendor/kartik-v/yii2-widget-fileinput
+++ b/vendor/kartik-v/yii2-widget-fileinput

Please explain me what is that exactly and How I deal with it?

Dark Cyber
  • 2,181
  • 7
  • 44
  • 68
  • 1
    Is your `vendor` folder not git ignored like it should be? – Bizley Jan 06 '17 at 09:02
  • I just comment it in `.gitignore` as I don't want to composer install in local git server. is it bad idea? any reference please? – Dark Cyber Jan 06 '17 at 09:06
  • Usually you do that so you can update dependencies later on without bothering with manual files replacing. It's up to you. The vendor files were not a part of your repo before so now `git add` is your friend (like it says in the message), you need to add them so git can track the changes. – Bizley Jan 06 '17 at 09:12
  • @Bizley just run `git add .` and `git status` again but thus file remain untracked and modified. – Dark Cyber Jan 06 '17 at 09:23
  • Your message states `git add `. – Bizley Jan 06 '17 at 09:25
  • it's a folder `$ git add vendor/kartik-v/yii2-date-range/* fatal: Pathspec 'vendor/kartik-v/yii2-date-range/CHANGE.md' is in submodule 'vendor/kartik-v/yii2-date-range'` and `$ git add vendor/kartik-v/yii2-date-range/` check `git status` but it remain untracked and modified. – Dark Cyber Jan 06 '17 at 09:31
  • 1
    Possible duplicate of [How do I work with a git repository within another repository?](http://stackoverflow.com/questions/1811730/how-do-i-work-with-a-git-repository-within-another-repository) – Bizley Jan 06 '17 at 09:34
  • It looks like `git submodule`. – 0andriy Jan 06 '17 at 17:49
  • trying this http://stackoverflow.com/questions/4161022/git-how-to-track-untracked-content – Dark Cyber Jan 06 '17 at 18:09
  • Hi Dark, Have you figured out this issue? Seems more related to git command, not related to TFS. Would you mind me removing TFS tag? – PatrickLu-MSFT Jan 09 '17 at 09:57
  • @Patrick-MSFT yes just solved it with remove .git in every subfolder. yes of course you remove TFS tag – Dark Cyber Jan 10 '17 at 16:40

0 Answers0