Home > Enterprise >  React Native project started with 'expo init my-project' is not able to be pushed to githu
React Native project started with 'expo init my-project' is not able to be pushed to githu

Time:11-13

I am adding all files git add . then committing git commit -m 'first commit', and then using these commands to set origin, set main branch and push: git branch -M main git remote add origin https://github.com/BeccaN/my-project.git git push -u origin main

I'm not getting any response to the push, its just hanging. What can I do to debug this further and hopefully find a solution?

EDIT I tried reinitializing a new repository from my mac laptop and it worked. Original I was using Ubuntu/Linux. Would still love to hear any theories or advice on why it wasn't working before but does work with Mac?

CodePudding user response:

expo init

Adds their .git directory from their repo when first ran.

You need to rebase the commit, delete the hidden .git directory and try again. One way to resolve before pushing to your repo is run the command:

rm -rf .git

After you cd into the project. Also you can reference this on their forum:

https://forums.expo.dev/t/why-is-there-a-git-in-my-expo-project-folder/12710

  • Related