Web projects deployment with git

03 December 2011

The sequence of commands I use now, probably, it’s possible to optimize more.

  1. Creating remote repository. Adding receive.denyCurrentBranch = ignore into the config to avoid remote rejections. First commit.
  2. Local checkout. Work. Commit.
  3. 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)

© 2020 Fedir RYKHTIK