what is the proper process to upload a react native project to a git hub repo?

Viewed 10941

I created a new repo for my new local React Native project at github.com. The create repo wizard displayed some .gitignore file options but there wasn't one specifically for React or React Native so I created the repo without a .gitignore. The created repo on github.com displayed a drag/drop area for me to drag/drop my RN files for upload. After I drag/dropped my project files github.com displayed an error saying that there were too many files. So what's the proper process for me to my RN project files into a new repo on github.com? I did a quick google and the following RN .gitignore file seems to be acceptable to reuse for my RN project, right?:

https://github.com/facebook/react-native/blob/master/.gitignore

2 Answers

Best way is to use the git commands through terminal.

Set your remote url

You can follow below steps:

  1. Open terminal, and navigate to your project folder: cd <ProjectName>

  2. Then add all your contents with command: git add .

  3. Add a message to commit: git commit -m "initial commit message"

  4. Finally, push your local repo to github account: git push -u origin master

You can follow this article: Click here

It's a simple process just download the git on your machine from here. https://git-scm.com/downloads

Open the terminal on project directory then

git init
git add .
git config --global user.name "your name"
git config --global user.email "your github email address"
git commit -m "initial commit"
git push -u origin master

Note: Don't delete .gitignore file.

Related