Reputation: 4564
I have cloned a template project.
I have then tore it apart, to make it my own project.
Now, git
believe that a subdirectory is a branch of the original template project and even when I run git add . -A
it does treat it as it was a repository.
When I was getting in the sub, the powershell was indicating that I was getting in a new repo. I executed rm -rf .git
in the subdirectory.
Now however, git status
says that the branch is up to date but in the master
what I have is just an empty directory, while in origin
I have all my code.
Upvotes: 0
Views: 764
Reputation: 1
subDir
) parent from where it is treated as it own repo. subDir1
). git pull origin <your branch>
(it will pull changes from remote)subDir
and its name changed directory subDir1
.subDir1
Now, subDir
and it's content will be part of your main repo.
Upvotes: 0
Reputation: 4564
No trick did the job. I have just had to delete the repository and start from scratch. Ugly, but got the job done.
Upvotes: 0
Reputation: 2368
Your subdirectory is a submodule, so you should use git submodule
instructions, as below -
git clone <main app>
cd main_app
git submodule init
git submodule update
Upvotes: 1