git-deploy icon indicating copy to clipboard operation
git-deploy copied to clipboard

Running without an argument will destoy origin/master

Open TheJosh opened this issue 10 years ago • 4 comments

Running git deploy setup without the -r and branch name clobbered existing post-receive hooks and also changed many permissions and deleted the master branch.

It should probably warn against this.

TheJosh avatar Dec 03 '15 04:12 TheJosh

I'm sorry that happened. I'll try to see what's going on there.

mislav avatar Dec 03 '15 08:12 mislav

I'm guessing that but not specifying an upstream, it auto-chose "origin". Note that in our situation here, our origin server, unlike most Git hosts, is running a full version of SSH rather than a jailed shell (it's a local server and the users log in to do other tasks).

I'd imagine that it tried (and succeeded due to the full shell) at installing to "origin".

TheJosh avatar Dec 03 '15 22:12 TheJosh

Thanks for the explanation.

How did it destroy the master branch, though?

mislav avatar Dec 04 '15 15:12 mislav

Not sure but a git push origin master fixed that. I also had to recreate my post-receive hook on the server.

There appeared to be a checkout of the repository within the bare repository (in this case it was within the /home/git/frog.git directory) On 05/12/2015 2:24 AM, "Mislav Marohnić" [email protected] wrote:

Thanks for the explanation.

How did it destroy the master branch, though?

— Reply to this email directly or view it on GitHub https://github.com/mislav/git-deploy/issues/78#issuecomment-162003341.

TheJosh avatar Dec 04 '15 20:12 TheJosh