I'm VERY new to the concept of git for managing source code. Before I make the leap, I do have a very basic question.
I understand the concept of cloning etc. But what I'm looking to do is have a central area such as a project on GitHub, where I can store all my code, commit changes etc.
Is there a command in Git to just update an existing clone?
Say I create a new GitHub project, add my code, then run a git clone command on my server to setup a new instance of that. Is there a command in git I can execute which would compare / update as needed? Obviously if there is user content uploaded inside a folder called "images" for example or a license key file uploaded I don't want these overwritten.
I'm hoping git has this function, would make my life super easy if I could just execute a git update command once a day on all the servers.
There are two commands to "syncronize" your local clone with an upstream repository:
$ git push
$ git pull
Push sends your changes to the upstream repository. Pull fetches and applies the changes from the upstream repository.
More information about the Git Distributed Workflow.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With