Search code examples
gitmercurial

How to configure automatic pushing?


How do I configure automatic push in Mercurial and Git? Sometimes I forgot to push in a computer, and when I move my location, I'm out of the sync with the good code. Is there a way to mercurial and git do this every hour, for instance?


Solution

  • In mercurial you'd put this in your .hg/hgrc

    [hooks]
    commit = hg push