-
Notifications
You must be signed in to change notification settings - Fork 0
Tutorial to add github project
How to use Git with React Native (for Mac users)
Reference: https://medium.com/react-native-institute/how-to-use-git-with-react-native-687c12431e36
While in your root directory, use terminal to create your react native project. $ react-native init gittest 2. Change your directory to your new project.
$ cd gittest 3. Initialize your project for git.
$ git init 4. Add all the files created by step #1.
$ git add . 5. Commit the files and add a message.
$ git commit -m “initial commit” 6. Now go to your github dashboard and create a new project.
-
Enter a name for your repository and click the “Create repository” button.
-
Copy the URL to the clipboard.
-
Go back to your terminal and set the origin by pasting the url from the clipboard.
$ git remote add origin {paste url from clipboard} 10. Push the files from your local machine to your github repository.
$ git push -u origin master Done. Your github repository is now setup. Use your git commands to commit and push code to your github repository after making code modifications on your local machine.
$ git commit -m “{message here}” $ git push -u origin master Hope this helps get you going with git and using your github repository for your react native projects.