# Project

## Project

eGit(Eclipse Git)을 이용하여 프로젝트를 브랜치에 연결 및 저장, 업로드할 수 있다.

## Share Project

생성한 프로젝트를 연결하고 싶은 경우 프로젝트를 우클릭하여 <mark style="color:blue;">Team</mark> → <mark style="color:blue;">Share Project</mark> 를 눌러 연결한다.

<div align="left"><img src="/files/hzaiydM3NRFO8XOWYz5l" alt=""></div>

이어지는 설정 화면에서 Repository를 선택한다<mark style="color:red;">(주의 : Create를 누르면 신규 저장소가 생성된다)</mark>. 이후 연결할 프로젝트를 선택하고 <mark style="color:blue;">Finish</mark>을 누르면 된다.

<div align="left"><img src="/files/5o1hnRhH4ObHJxAA80gm" alt=""></div>

연결이 완료된 상태는 다음과 같다.

<div align="left"><img src="/files/nIPYjdkjdK2vC8RRk2wK" alt=""></div>

프로젝트 우측에 표시되는 정보는 저장소 이름과 브랜치 이름이다. 그리고 ?표시 되어 있는 파일들은 처리 방침이 정해지지 않은 파일이며, 해당 파일들을 <mark style="color:blue;">Commit</mark> 또는 <mark style="color:red;">Ignore</mark> 처리할 수 있다.

## Add to Index

<mark style="color:blue;">Add to Index</mark> 메뉴를 통해 저장소에 저장하고 싶은 파일들을 미리 담아둘 수 있다.

* 해당 파일을 우클릭하여 Add to Index 선택 - 선택한 파일 담기
* 프로젝트를 우클릭하여 Add to Index 선택 - 프로젝트 내의 가능한 모든 파일 담기
* Git Staging 화면을 열어 Add to Index 선택 - 파일 담기 및 제거 화면에서 직접 선택하여 담기

#### Git staging

![](/files/9x7PUWUS2nED4KeKQXU0)

* <mark style="color:blue;">Unstaged Changes</mark> - 변경 상태를 저장하지 않을 파일
* <mark style="color:blue;">Staged Changes</mark> - 변경 상태를 저장할 파일
* <mark style="color:blue;">Commit Message</mark> - 저장 시 사용할 메세지
  * 첫 줄에는 제목을, 세 번째 줄부터 설명을 작성한다.
* <mark style="color:blue;">Author</mark> - 코드의 작성자. <mark style="color:red;">아이디<이메일></mark> 형식으로 작성
* <mark style="color:blue;">Committer</mark> - 코드를 Commit하는 사람. <mark style="color:red;">아이디<이메일></mark> 형식으로 작성

## Commit

Local Repository에 변경사항과 메세지를 함께 기록한다.

<div align="left"><img src="/files/iSsqQw7AAfcDsfoTIa6W" alt=""></div>

### Commit and Push

Commit과 함께 Remote Repository에 Commit된 내용을 전송한다.

<div align="left"><img src="/files/e0WjrTY9AOjXNZMOSvGM" alt=""></div>

## Push Head

Local Repository의 최신 상태(Head)를 <mark style="color:blue;">Remote Repository</mark>에 전송한다. push 하지 않은 commit 내역이 <mark style="color:blue;">Remote Repository</mark>로 업로드된다.

<div align="left"><img src="/files/qiiBy32MKIUXR3luk8ZB" alt=""></div>

## ignore

이후의 Commit에서 무시하고 싶은 항목들은 ignore 설정할 수 있다. ignore 설정을 하면 `.gitignore`라는 파일이 생성되거나 존재할 경우 내용이 추가되므로 해당 파일을 반드시 Commit해야 이후의 작업에서 해당 파일이 무시된다.

<div align="left"><img src="/files/aCM8HFfJArAVXzLGsb9o" alt=""></div>

## fetch

fetch는 <mark style="color:blue;">Remote Repository</mark>의 변경사항을 확인하여 가져오는 명령이다. <mark style="color:blue;">Local Repository</mark>에 병합하지는 않는다.

## pull

pull은 <mark style="color:blue;">Remote Repository</mark>의 변경사항을 확인하여 가져와 병합하는 명령이다. <mark style="color:blue;">Local Repository</mark>에 병합하여 필요한 경우 Merge를 수행한다.

## disconnect

프로젝트의 Git 연결을 종료하고 싶을 경우 사용한다. disconnect를 하고 나면 해당 프로젝트는 더이상 Git을 이용하여 관리할 수 없다.

<div align="left"><img src="/files/QC18B98waTh8jSWPKIrJ" alt=""></div>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sysout.co.kr/etc/github/github-integrated/project.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
