Fund 5 new projects: git issues

I feel like I'm losing my mind about this.

I am trying to start a new project with Foundation 5 , and I am having a very strange problem with my git repository. I used to use Foundation 4, and I have a check that I meet all the requirements (git, ruby ​​+1.9, node, etc.).

I want to use Foundation with a compass. We have a server where private git repositories are stored, so, as usual, I first create a git repository and create a new folder for it, say Documents/client . Then I create the foundation project inside, for example cd Documents/client foundation new my_project . No mistakes.

Foundation 5 creates the my_project folder with everything inside (bower_components, config.rb, etc.). But when I try to add my_project to my repo , I see that it is being added as a submodule, apparently because my_project already has git repo in it.

What I find strange is that a) I see some local commits related to the development of the Fund made by @mhayes
b) If I search for these commits on the fund repository , I cannot find them
c) I do not have a remote control from

I admit that my gw knwoledge is pretty simple, but I never had such problems with Foundation 4, although I know that using the gazebo makes things completely different, but I'm completely stuck.

In addition, I can’t find a lot of documentation (Foundation documents are so minimal!) And help The forum does not work (I can’t log in), so I don’t need to say any help, I will be very grateful ...

+6
source share
2 answers

Finally, I deleted the .git folder inside my_project , but left the .gitignore inside, and now my repo (with the client folder with administrator privileges) is working fine: there are no more Foundation-related commits plus I have a remote one. I can click and drag.

Apparently this solved the problem, although I would still like to know if this solution is good practice or just a disgusting solution ... I don't think this is normal behavior when I get a git repo when creating a project with foundation new . ..

0
source

Your conclusion is correct.

After you have a .git folder inside another git git folder, you don't really like it.
The way to handle this is pretty simple:

  • Add the internal .git folder to .gitignore .
  • Define the internal project as a submodule.

Submodules allow you to store the git repository as a subdirectory of another git repository. This allows you to clone another repository into your project and save your commits separately.

0
source

Source: https://habr.com/ru/post/959337/


All Articles