Home > Software design >  Github update old repo with new project
Github update old repo with new project

Time:09-11

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:

  1. In the old repository locally from the terminal run

    git pull

  2. Commit any changes or stash and clear them if not wanted

  • git add .
  • git commit -m "updating x"
  • git push
  1. Delete the node modules folder using the terminal
  2. Delete everything else inside the folder then run
  • git add .
  • git commit -m "removed old project files"
  • git push
  1. Delete the node modules folder in the new project
  2. Copy the contents of everything inside the new project and drag and drop it in the old repo folder
  3. In the old repo again run
  • git add .
  • git commit -m "moved new project"
  • git push
  1. npm install in the old repo and confirm everything's working
  • Related