이롭게 현명하게

[Git] JAVA 코드만 깃에 올리기1 / JAVA .gitignore 본문

Git

[Git] JAVA 코드만 깃에 올리기1 / JAVA .gitignore

dev_y.h 2023. 1. 11. 18:20
728x90
반응형

※본 포스팅은 윈도우 11, Eclipse 환경을 바탕으로 작성되었습니다.


1. 깃허브에 로그인 후 화면에서 오른쪽 상단에 있는 + 버튼 클릭 > New repository 클릭

2. Repository name을 작성 후 저장소 생성

Add .gitignore에서 JAVA를 선택

 

3. ignore 파일 추가하기

추가로 ignore 파일을 작성하기 위해 운영체제, 개발환경, 프로젝트 언어를 순서대로 입력 후 생성 버튼 클릭

 

gitignore.io

Create useful .gitignore files for your project

www.toptal.com

생성된 ignore 파일

더보기

 

# Created by https://www.toptal.com/developers/gitignore/api/windows,eclipse,java
# Edit at https://www.toptal.com/developers/gitignore?templates=windows,eclipse,java

### 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*

### Windows ###
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

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

4. 깃 허브에서 .gitignore 클릭

.gitignore에서 수정 버튼 클릭

내용 모두 삭제 후 복사했던 .gitignore 붙여 넣기 후 commit change 클릭


잘못된 정보는 댓글에 남겨주시면 감사하겠습니다!😊

댓글과 좋아요는 큰 힘이 됩니다!

728x90
반응형
Comments