D
D
damn_everyday2019-07-01 18:25:26
git
damn_everyday, 2019-07-01 18:25:26

Why does Git behave like this?

Learning Git, asking for help:
For example, I have a Project folder that contains more folders: folder1, folder2, folder3.
For each each folder there is a separate branch on Github.
When I work in the folder2 branch, the contents of folder1 disappear from the folder. Here is the folder itself, but it is empty.
If anything - VScode code editor. Is this how it should be, or am I doing something wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey P, 2019-07-01
@damn_everyday

answer to the question:
because the repository from folder2 "overlaps" the parent repository.
what can be done with this:
1. move folder1, folder2, folderN into plug-ins of your language and organize work through submodules in git https://git-scm.com/book/en/v1/%D0%98%D0%BD %D1%81%...
2. get a mono-repository. e.g. https://github.com/lerna/lerna this tool does a good job

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question