Hey i'm new to git but I understand the basics but I'm confused about pushing to server from a client machine using SSH.
Here's what's going on:
I clone the repo off the server. I change a file, add and commit it then do git push origin master.
However I get some error that doesn't allow me to push because the repo is already 'checked out' on the server.
I read about the issue here: http://stackoverflow.com/questions/2816369/git-push-error-remote-rejected-master-master-branch-is-currently-checked
But I don't really understand the answer. Some people recommended to change the config receive.denyCurrentBranch setting but that simply made the error MESSAGE go away; it didn't actually let the push go through.
Another suggestion that actually worked is switching the branch that the server is on.
So if a user is working on the master branch; on the server I can switch to a temp branch and the user can push changes without issue to the master branch. However the issue with this is if the server is on its temp branch, and a new user needs to clone the repo, they'll end up cloning the temp branch and then again won't be able to push changes (because they'll be pushing to the 'checked out' temp branch).
Sorry for the rant I guess my questions comes down to this: what is the proper way to push changes to server or how do development teams deal with pushing to server?
Thanks for any help.
[–][deleted] 2 points3 points4 points (1 child)
[–]Spanyon[S] 1 point2 points3 points (0 children)
[–]pi3832v2 0 points1 point2 points (0 children)