문제

We are looking to have a Git architecture like the following.

Git architecture

I have created two bare repositories for these.

  1. //production/repo/MyProject.git (prod-repo)
  2. //dev/repo/MyProject.git (dev-repo)

After pushing my code to the dev-repo and testing it, I want to push all the changes to prod-repo. Obviously I won't have a working directory on either of these machines? How can I push all the files in the dev-repo to prod-repo?

도움이 되었습니까?

해결책

You don't need to have a working copy to do push and fetch operations with git, so just push as you normally would:

git push prod <branch>

Working copies are only necessary if you're going to be modifying (or possibly modifying) code (like with a commit, merge, rebase, pull, etc).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top