{"action":"created","issue":{"url":"https://api.github.com/repos/Unitech/pm2/issues/1853","labels_url":"https://api.github.com/repos/Unitech/pm2/issues/1853/labels{/name}","comments_url":"https://api.github.com/repos/Unitech/pm2/issues/1853/comments","events_url":"https://api.github.com/repos/Unitech/pm2/issues/1853/events","html_url":"https://github.com/Unitech/pm2/issues/1853","id":123664368,"number":1853,"title":"Is there a reason why `pm deploy` needs to be run in a git repo?","user":{"login":"despairblue","id":927609,"avatar_url":"https://avatars.githubusercontent.com/u/927609?v=3","gravatar_id":"","url":"https://api.github.com/users/despairblue","html_url":"https://github.com/despairblue","followers_url":"https://api.github.com/users/despairblue/followers","following_url":"https://api.github.com/users/despairblue/following{/other_user}","gists_url":"https://api.github.com/users/despairblue/gists{/gist_id}","starred_url":"https://api.github.com/users/despairblue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/despairblue/subscriptions","organizations_url":"https://api.github.com/users/despairblue/orgs","repos_url":"https://api.github.com/users/despairblue/repos","events_url":"https://api.github.com/users/despairblue/events{/privacy}","received_events_url":"https://api.github.com/users/despairblue/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-23T14:00:36Z","updated_at":"2016-01-04T09:31:21Z","closed_at":"2016-01-04T09:31:21Z","body":"```bash\r\ndanny@admins-iMac ~> pm2 deploy /Users/danny/git/test-deploy/test.json staging\r\n--> Deploying to staging environment\r\n--> on host test.cloudapp.net -p 22\r\nNot a git repository\r\nTo compare two paths outside a working tree:\r\nusage: git diff [--no-index] <path> <path>\r\n\r\n  commit or stash your changes before deploying\r\n\r\nDeploy failed\r\ndanny@admins-iMac ~> mkdir test\r\ndanny@admins-iMac ~> cd test\r\ndanny@admins-iMac ~/test> git init\r\nInitialized empty Git repository in /Users/danny/test/.git/\r\ndanny@admins-iMac ~/test> pm2 deploy /Users/danny/git/test-deploy/test.json staging\r\n--> Deploying to staging environment\r\n--> on host test.cloudapp.net -p 22\r\nfatal: no such branch: 'master'\r\n  ○ deploying origin/master\r\n  ○ executing pre-deploy-local\r\n  ○ hook pre-deploy\r\n  ○ fetching updates\r\nFetching origin\r\n  ○ resetting HEAD to origin/master\r\n...\r\n```"},"comment":{"url":"https://api.github.com/repos/Unitech/pm2/issues/comments/168621645","html_url":"https://github.com/Unitech/pm2/issues/1853#issuecomment-168621645","issue_url":"https://api.github.com/repos/Unitech/pm2/issues/1853","id":168621645,"user":{"login":"Unitech","id":757747,"avatar_url":"https://avatars.githubusercontent.com/u/757747?v=3","gravatar_id":"","url":"https://api.github.com/users/Unitech","html_url":"https://github.com/Unitech","followers_url":"https://api.github.com/users/Unitech/followers","following_url":"https://api.github.com/users/Unitech/following{/other_user}","gists_url":"https://api.github.com/users/Unitech/gists{/gist_id}","starred_url":"https://api.github.com/users/Unitech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Unitech/subscriptions","organizations_url":"https://api.github.com/users/Unitech/orgs","repos_url":"https://api.github.com/users/Unitech/repos","events_url":"https://api.github.com/users/Unitech/events{/privacy}","received_events_url":"https://api.github.com/users/Unitech/received_events","type":"User","site_admin":false},"created_at":"2016-01-04T09:31:21Z","updated_at":"2016-01-04T09:31:21Z","body":"pm2-deploy only git versioned projects. The git repo + branch need to exists on the remote server"}}