github - Adding a folder content in Git -
so bit weird. i'm working on git repository, , fine. until added folder named "tests" repository using git add .
. noticed no files added git used do.
so pushed github check if files added or not, because "test" figuring out in "git status" log (but none of "tests" files).
i got weird green icon, , first time stumble across it. can see icon in github repository.
the commit log shows following
+subproject commit 70b4cc379d0e1e749085ec1b3aaa0dd1cd0fc9b7
so icon mean , did happen?
edit: didn't add submodule, , if there one, there should have been ".gitmodules" file created track them. guess git got confused though shouldn't.
the cure simple
git rm tests --cached git add tests git commit -m "fixed!"
as radium pointed out, you've added new git submodule
.
the last line in output of git show
confirms added new subproject:
$ git show a068b76 commit a068b7629f29f8774db67a7384dbeee732a89adb author: date: wed may 8 17:18:47 2013 +0100 unit testing diff --git a/.gitignore b/.gitignore index d56bef9..30d9aa6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .idea/ .gitignore +tests/wp-tests-config.php diff --git a/tests b/tests new file mode 160000 index 0000000..70b4cc3 --- /dev/null +++ b/tests @@ -0,0 +1 @@ +subproject commit 70b4cc379d0e1e749085ec1b3aaa0dd1cd0fc9b7
by chance did run git submodule add <url> tests
forgot add file .gitmodules
created, git's version control ?
if add directory .git
directory, git
merely going ignore .git
, add other files inside it. not create new subproject commit
unless explicitly ask create new submodule.
Comments
Post a Comment