DEV Community

Cover image for Remove Git Config from New Rails / React / etc Project
Max Anselmo
Max Anselmo

Posted on

Remove Git Config from New Rails / React / etc Project

Have you ever begin working on a full stack project, created a new React (enter front end framework name here) and Ruby on Rails (enter back end framework name here) project inside of a single Github repository?
ex file structure

--- coffee-shop-app (github repo)
|
|---react-front-end
|
|---rails-back-end

You may have encountered an issue when trying to push code and met with this message:

"You've added another git repository inside your current repository.
Clones of the outer repository will not contain the contents of the embedded repository and will not know how to obtain it."

Some frameworks include a file for their own github configurations with the rest of the boilerplate code.

Luckily, to delete this file all you need to do is cd into each submodule repo and use the command

rm -rf .git
Enter fullscreen mode Exit fullscreen mode

Now you will be able to freely add files from your encompassing github repo.

Hope this helps, this totally threw me for a loop at first!

Top comments (0)