1

Currently working on a React app for a school project and need to be able to share the code with my team. I created the app using npx create-react-app app-name. I then try to add app-name to GitHub however I get the following:

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

Why can't I add this folder to GitHub like a regular folder? Is there a better way to share a React app with the team?

Thanks

1 Answer 1

1

Looks like you have 2 repos. Did you run git init more than once?

I would look in your project code for any .git folders and delete them.

This command will show you any git related files and folders:

find . -type d -name ".git" \
&& find . -name ".gitignore" \
&& find . -name ".gitmodules"

Move to your root project directory and run git init again.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.