Author Topic: Forking a repository  (Read 22923 times)

adindar

  • Newbie
  • *
  • Posts: 13
    • View Profile
Forking a repository
« on: August 14, 2020, 05:01:24 PM »
Dear all,
I'd forked the Bootcamp repository and done "git clone https://github.com/ahmetanildindar/SimCenterBootcamp2020" to my computer prior the start of the classes. This happened last Friday.

I was late to the first hour yesterday and missed some topics on git.

Here is my question; is it possible to update my forked repository which is of course behind the current Simcenter and somehow sync with current Simcenter?

I hope I've expressed myself well.

++Ahmet

asuselo

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Forking a repository
« Reply #1 on: August 14, 2020, 05:56:22 PM »
try this steps (from yesterday's slide):

Exercise – Lets Synch your FORK with SimCenter
1. Open terminal window/ Powershell
2. cd to SimCenterBootcamp2020 folder
3. Lets add and commit any changes (or checkout original) .. Type: git status
git add .
git commit –m “my great changes”
4. Lets look at remotes repos
git remote -v
5. Add NHERI-SimCenter/SimCenterBootcamp-2020 as upstream
git remote add upstream https://github.com/NHERI-SimCenter/SimCenterBootcamp2020.git
6. Look at remotes again
git remote -v
7. Lets fetch upstream
git fetch upstream
8. Use checkout to get last committed version
git merge upstream/master
9. Git add, commit and push to our own remote repo (origin)
git add .
git commit –m “fmk – updated code from merge”
git push origin master
10. Go to your browser, your remote repo (origin) should contain latest code

adindar

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Forking a repository
« Reply #2 on: August 15, 2020, 06:02:25 AM »
Thanks, it worked for me.

Best regards.

++Ahmet

joshmcquin

  • Newbie
  • *
  • Posts: 1
  • Developer
    • View Profile
Re: Forking a repository
« Reply #3 on: June 10, 2023, 09:12:40 AM »
Thanks for the information guys
I work at https://solveit.dev/services/dedicated-development-team - A dedicated team is the best choice for large and long-term development projects.