Search code examples
gitgithubgit-pushgit-pullgit-clone

Automatic git Pull on Cloned Folder in desktop


I have a folder on my desktop which is git cloned to a certain branch. Now I want to do a Automatic Git pull whenever something is pushed to that branch (Assuming there are no conflicts). How do I achieve this ? I am a novice in GIT. So looking for some detailed solution.


Solution

  • Automatic Git push is not something already there in with GIT. Plus they won't even suggest that because You might be working on something or in middle of something. SO auto pull may cause issues.

    If you still want that Then there are basically 2 ways:

    1. Set up a CRON in your system and simply add git pull to it.
    2. Another would be that, github provides webHooks, so you can setup a local web server on your machine and trigger git pull on that trigger on webhook