당시 상황 : database 연동정보가 Github에 Commit 되어 있었다! (식겁)
많은 회사나 개인이 이런 사내기밀 자료, 개인정보 노출 위험에서 안전하지 않으니, 반드시 신경 써야 하는 부분이다.
매번 Commit 할 내역에서 해당 클래스나 폴더를 제외하고 Commit, Push하는 일은 귀찮고 케어하기 힘들다.
그래서 사용하는 것이 Ignore이라는 기능이다.
사용하는 방법은 굉장히 다양하지만 이클립스와 Github 연동되었다는 가정 하에
간단한 방법을 소개해보려한다.
우클릭 > Team > Ignore 선택!


.gitignore내 코드에 '/연동에서 제외하고 싶은 클래스' 있을 것이다!
추후에도 /클래스명 이런 식으로 작성하면 ignore적용 가능

https://www.gitignore.io/
예시코드 ⬇️
# Created by https://www.toptal.com/developers/gitignore/api/macos,eclipse,java
# Edit at https://www.toptal.com/developers/gitignore?templates=macos,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*
### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### macOS Patch ###
# iCloud generated files
*.icloud
# End of https://www.toptal.com/developers/gitignore/api/macos,eclipse,java