eclipse와 git repository 연동

jeongwoo·2022년 6월 16일
1

git

목록 보기
2/3
post-thumbnail

eclipse와 git repository 연동

1-1. [Window] - [Perspective] - [Open Perspective] - Other...

1-2. Git을 선택 후 Open

1-3. URL에 Remote repository 주소를 복사하여 붙여넣는다.

  • Remote repository 주소를 붙여넣으면 Host와 Repository path는 자동으로 채워진다.

1-4. User와 Password에 github 아이디와 비밀번호를 입력한다.

  • Next 클릭

  • Next 클릭

  • Finish 클릭

1-5. 좌측에서 Git Repositories를 확인한다.

  • 아래와 같이 됐으면 eclipse와 Repository가 연동된 것이다.

프로젝트를 저장소에 연동하기

1. 프로젝트 우클릭 - [Team] - [Share Project]

  • Git 선택 후 Next 클릭

  • eclipse에 연동되어 있는 repository 선택 후 Finish 클릭

  • 연결 확인
  • 프로젝트 내에 DEV/GodGamez/godgamez 가 생긴다.

2. .gitignore 생성

  • https://gitignore.io/ 에서 Eclipse, java, Maven 검색한 결과 복사 붙여넣기 후 파일생성
# Created by https://www.toptal.com/developers/gitignore/api/eclipse,java,maven
# Edit at https://www.toptal.com/developers/gitignore?templates=eclipse,java,maven

### Eclipse ###
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# PyDev specific (Python IDE for Eclipse)
*.pydevproject

# CDT-specific (C/C++ Development Tooling)
.cproject

# CDT- autotools
.autotools

# Java annotation processor (APT)
.factorypath

# PDT-specific (PHP Development Tools)
.buildpath

# sbteclipse plugin
.target

# Tern plugin
.tern-project

# TeXlipse plugin
.texlipse

# STS (Spring Tool Suite)
.springBeans

# Code Recommenders
.recommenders/

# Annotation Processing
.apt_generated/
.apt_generated_test/

# Scala IDE specific (Scala & Java development for Eclipse)
.cache-main
.scala_dependencies
.worksheet

# Uncomment this line if you wish to ignore the project description file.
# Typically, this file would be tracked if it contains build/dependency configurations:
#.project

### Eclipse Patch ###
# Spring Boot Tooling
.sts4-cache/

### Java ###
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

### Maven ###
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
.mvn/wrapper/maven-wrapper.jar

# Eclipse m2e generated files
# Eclipse Core
.project
# JDT-specific (Eclipse Java Development Tools)
.classpath

# End of https://www.toptal.com/developers/gitignore/api/eclipse,java,maven

3. eGovFrame말고 Git에서 프로젝트 우클릭 - [Pull]

  • pull을 하면 class 파일 등 .gitignore에 설정된 파일들이 Unstaged Changes에서 사라졌음을 확인 할 수 있다.

0개의 댓글