How to update github repository?

Some time ago I downloaded the thumbnails from MAME and FBNeo with “git clone”.
I am currently trying to update them, but that command only works on empty directories.

I have found two instructions:

$ git init
$ git remote add origin <repository>
$ git pull origin master

and…

$ git init
$ git remote add origin <repository>
$ git fetch
$ git checkout master

Which one would be the right one to upgrade?

if you haven’t made any modifications, just go into the repo and ‘git pull’

1 Like

If you didn’t modify anything, git pull will work. If you did modify something, you can’t update. You’ll get errors about conflicts. If you want to get rid of all local modification and update, you can do:

git fetch origin
git reset --hard origin/master
2 Likes

I have not modified anything, git pull worked.
Thanks!

1 Like