samedi 19 octobre 2019

making sure Git merge / pull from remote fully updates repo

have question its not about a particular bit of code.

Have 3 git repositories, one is local (dev), one production (site with a domain name), and a remote repo at a code site like github.

I decided to do my changes to code in local repo, pushing them to the remote repo, then ssh into the server production repo and fetch/merge or pull updates from remote repo.

Today I did it second time to update some content. Fetch and merge did not go well, part of the code was updated but part (eg. styling) was obviously missing. Second time I tried just pulling to prod server from remote, and this time it seemed to work as things looked apparently right. But browsing I notice a few small changes are not applied.

found fix : git reset --hard origin/master

This applied all changes to prod repo. But now Im worried anytime I pull to prod repo some small thing might not be applied. How do I reliably update from a remote repo? Did I just do something wrong? is there some setting I can change or do I need to do above fix every time?

Aucun commentaire:

Enregistrer un commentaire