Web projects deployment with git
The sequence of commands I use now, probably, it’s possible to optimize more.
- Creating remote repository. Adding
receive.denyCurrentBranch = ignore
into the config to avoid remote rejections. First commit. - Local checkout. Work. Commit.
- Remote hard reset / force checkout.
It’s also possible to use bare repository, but in this case we could have some limitation on remote side.
It’s possible also to work on a branch and not on the trunk, in this case You will also need to make checkout on the remote side.
References :
- http://toroid.org/ams/git-website-howto
- http://stackoverflow.com/questions/2816369/git-push-error-remote-rejected-master-master-branch-is-currently-checked-o
- http://habrahabr.ru/blogs/Git/60347/ (ru)
- http://i-said.simplog.ru/posts/198-git-na-dvoih (ru)