SimCenter Training > Programming Bootcamp

Forking a repository

(1/1)

adindar:
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:
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:
Thanks, it worked for me.

Best regards.

++Ahmet

joshmcquin:
Thanks for the information guys

Navigation

[0] Message Index

Go to full version