When I commit some changes by git or mercurial, I would like to automatically backup (or do similar changes) in another place (backup directory for this project.)
Is it possible?
When I commit some changes by git or mercurial, I would like to automatically backup (or do similar changes) in another place (backup directory for this project.)
Is it possible?
I found solution. In folder .hg I created myhook.sh file and I changed hgrc. I have done in this way:
.hg/hgrc: [hooks] commit =/fullPathToMyHook/myhook.sh myhook.sh: hg pull /pathToMyBackUpProject hg merge hg update hg push /pathToMyBackUpProject
Now, then I write
hg commitit automatically: commit my changes, get last changes from my backup storage, merge it, update and push all changes to backup storage.