> For the complete documentation index, see [llms.txt](https://organization-bht.gitbook.io/it/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://organization-bht.gitbook.io/it/git/sourcetree/team-project/undefined.md). Agents can also search and read this documentation through its [MCP server](https://organization-bht.gitbook.io/it/~gitbook/mcp).

# 팀장 프로젝트 셋팅

팀 프로젝트에서 팀장이 진행해야하는 프로젝트 설정에 대한 정보를 기술한 페이지.

## 조건

* [깃 허브 계정 및 Personal Access Token](https://organization-bht.gitbook.io/it/git/github.md), [SourceTree](https://organization-bht.gitbook.io/it/git/sourcetree/undefined.md)가 존재해야한다.
* [Spring 프로젝트](https://organization-bht.gitbook.io/it/framework/spring/spring-legacy.md)를 실행하기 위한 언어 , IDE, 기타 프레임워크가 설치되어 있어야한다.
* 조건들중 빠진게 있나 체크해보도록 하자.

## 1)[ Collaborator 추가](https://organization-bht.gitbook.io/it/git/sourcetree/team-project/undefined/collaborator.md)

## 2) 초기 프로젝트 생성 및 초기화

1. 생성해둔 원격 레파지토리를  **Clone**한다.&#x20;

<figure><img src="https://3572862491-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUON3CGxVeoUR2YdtAhxl%2Fuploads%2FYnCwVoG6uM0M4cegPvHA%2Fimage.png?alt=media&amp;token=cbef31f6-0be8-437f-94fa-973f199e14e1" alt=""><figcaption></figcaption></figure>

위 이미지에서 <mark style="color:blue;">**animals**</mark>가 <mark style="color:blue;">**프로젝트(clone대상)**</mark>이고 <mark style="color:purple;">**SemiProject**</mark>가 <mark style="color:purple;">**Workspace**</mark>이다. 즉 animals폴더가 클론을 진행한 **Local Repository**라는 뜻.&#x20;

2. IDE를 통해 **SemiProject**선택한 후 열어준다.
3. [프로젝트 환경설정](https://organization-bht.gitbook.io/it/framework/spring/spring-legacy/undefined.md)을 진행한다.
4. [프로젝트를 생성](https://organization-bht.gitbook.io/it/framework/spring/spring-legacy/undefined-1.md)한다.(생성이슈도 확인)
5. [Maven](https://organization-bht.gitbook.io/it/framework/spring/spring-legacy/maven.md), [web.xml ,](https://organization-bht.gitbook.io/it/framework/spring/spring-legacy/web.xml.md) [Spring Bean Configuration.xml](https://organization-bht.gitbook.io/it/framework/spring/spring-legacy/spring-bean-configuration.xml.md) 설정을 진행한다.
6. 프로젝트 설계시 작성한 클래스다이어그램, 와이어프레임, ERD등을 통해 프로젝트에 필요한 기본적인 **패키지**나 **폴더**를 생성후 **더미파일**을 추가한다.

{% hint style="info" %}
**원격 레파지토리에는 디렉토리를 단독으로 push할 수 없다.**

반드시 File형태의 데이터만 추가해야 하므로 첫 설정시 작업용 package경로만 추가하고 싶다면 각 패키지, 폴더 경로에 **더미파일**을 하나씩 추가해줘야한다.

**더미파일**은 생성할때는 **실제 사용할 파일**을 미리 넣어줘도 되고 클래스명 등이 구체적으로 정해지지 않았다면 **.`keep`**&#xC744; 파일명으로 관례상 사용한 다.
{% endhint %}

<figure><img src="https://3572862491-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUON3CGxVeoUR2YdtAhxl%2Fuploads%2F8Rzqlj1TGBcjnjK56jsA%2Fimage.png?alt=media&amp;token=670be08e-c726-481e-894a-839c8d490d3e" alt=""><figcaption><p>dummy file</p></figcaption></figure>

## 3) [.gitigore 설정](https://organization-bht.gitbook.io/it/git/sourcetree/team-project/undefined/.gitignore.md)

## 4) [main 브랜치 병합](https://organization-bht.gitbook.io/it/git/sourcetree/branch.md#branch-push)&#x20;

## 5) [병합 후 main 브랜치 보호](https://organization-bht.gitbook.io/it/git/sourcetree/branch/branch-protection-rules.md)
