I am very new to Github so please bear with me. I created a react native project with a github repository a while ago and have made commits over the past month. Recently the project stopped working so I recreated the project in a different folder on my computer. I want to update my old repository from my new project and am not quite sure how to do that. Any help would be appreciated :)
CodePudding user response:
In the old repository locally from the terminal run
git pull
Commit any changes or stash and clear them if not wanted
- git add .
- git commit -m "updating x"
- git push
- Delete the node modules folder using the terminal
- Delete everything else inside the folder then run
- git add .
- git commit -m "removed old project files"
- git push
- Delete the node modules folder in the new project
- Copy the contents of everything inside the new project and drag and drop it in the old repo folder
- In the old repo again run
- git add .
- git commit -m "moved new project"
- git push
- npm install in the old repo and confirm everything's working