{"action":"opened","issue":{"url":"https://api.github.com/repos/18F/pages-server/issues/19","labels_url":"https://api.github.com/repos/18F/pages-server/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/18F/pages-server/issues/19/comments","events_url":"https://api.github.com/repos/18F/pages-server/issues/19/events","html_url":"https://github.com/18F/pages-server/issues/19","id":127055168,"number":19,"title":"Make git publishing more robust","user":{"login":"mbland","id":301547,"avatar_url":"https://avatars.githubusercontent.com/u/301547?v=3","gravatar_id":"","url":"https://api.github.com/users/mbland","html_url":"https://github.com/mbland","followers_url":"https://api.github.com/users/mbland/followers","following_url":"https://api.github.com/users/mbland/following{/other_user}","gists_url":"https://api.github.com/users/mbland/gists{/gist_id}","starred_url":"https://api.github.com/users/mbland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbland/subscriptions","organizations_url":"https://api.github.com/users/mbland/orgs","repos_url":"https://api.github.com/users/mbland/repos","events_url":"https://api.github.com/users/mbland/events{/privacy}","received_events_url":"https://api.github.com/users/mbland/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-16T21:41:06Z","updated_at":"2016-01-16T21:41:06Z","closed_at":null,"body":"Inspired by http://grimoire.ca/git/stop-using-git-pull-to-deploy, and mostly implemented in 18F/18f.gsa.gov#1441, we should update the server so that instead of `git stash` and `git pull`, we use (where `BRANCH` corresponds to `SiteBuilder.branch`):\r\n\r\n```\r\ngit fetch origin BRANCH\r\ngit clean -f\r\ngit reset --hard origin/BRANCH\r\n```\r\n\r\nWe may also want to add the `--recursive` flag to `git update submodules --init` as well."}}