Git으로 작업하기

Lockfiles#

항상 lockfile(pnpm-lock.yaml)을 커밋하세요. 이는 여러가지 이유가 있으며 그 중 주된 이유는 다음과 같습니다.

  • package resolution을 건너뛸 수 있어서 CI(Continuous Integration) 및 운영 환경에서 빠른 설치가 가능합니다.
  • 개발, 테스트, 프로덕션 환경에서 일관된 패키지 설치 및 해결을 강제하여 테스트 및 프로덕션 환경에서 사용되는 패키지가 프로젝트 개발 시 사용된 패키지와 완전히 동일하도록 합니다.

병합 충돌#

pnpm은 pnpm-lock.yaml의 병합 충돌을 자동으로 해결할 수 있습니다. If you have conflicts, run pnpm install and commit the changes.

If both sides of the conflict are valid lockfiles, pnpm merges them. Otherwise it fails with the parse error. Review the result before committing.

To avoid lockfile merge conflicts, use Git branch lockfiles.