X-Git-Url: https://git.r.bdr.sh/rbdr/blog/blobdiff_plain/f24ecd569d1945fbbdf18fad9398ea338d8eb2c6..b0c3bb911306b2468152cf8a83c28eca843b7647:/lib/remotes/git.js?ds=inline diff --git a/lib/remotes/git.js b/lib/remotes/git.js index 11fdab8..c894122 100644 --- a/lib/remotes/git.js +++ b/lib/remotes/git.js @@ -24,7 +24,10 @@ module.exports = { async syncDown(remote, blogDirectory) { await internals.exec(`cd ${blogDirectory} && git init`); - await internals.exec(`cd ${blogDirectory} && git checkout .`); + try { + await internals.exec(`cd ${blogDirectory} && git checkout .`); + } + catch {} await internals.exec(`cd ${blogDirectory} && git clean . -f`); await internals.exec(`cd ${blogDirectory} && git pull ${remote} main`); }