DEV Community

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

Posted on

2 1

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!

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay