git ignore 파일 만들기

Git 2015. 12. 28. 23:41

.gitignore 를 만들어 보자


add, commit, push 등  git명령어에서 제외(파일,디렉토리) 설정하는 기능.




# gitignore 파일 만들기 /=====================

--------------------------------------------------------------------


$ vi ~/.gitignore

_data/ : _data 디렉토리 제외

abc.php : abc.php 파일은 제외

a*.php  :  a 로 시작하고 확장자가 .php 인 파일

sftp*.json  : 파일제외




# git config 에 등록 /=====

-----------------------------------

$ git config --global core.excludesfile ~/.gitignore



#확인하는 방법 /========

-----------------------------------

$ cat ~/.gitconfig


[core]

    excludesfile = /home/color106/.gitignore

'Git' 카테고리의 다른 글

브랜치 생성, 삭제, 변경  (0) 2015.08.26
Git 초기 셋팅  (0) 2015.03.05

브랜치 생성, 삭제, 변경

Git 2015. 8. 26. 11:34

# 브랜치 생성(로컬저장소)

git checkout -b devel 


# 브랜치 생성(서버저장소)

git push origin devel 


# 브랜치 변경

git checkout master 


# 브랜치 삭제

git push origin :devel 



'Git' 카테고리의 다른 글

git ignore 파일 만들기  (1) 2015.12.28
Git 초기 셋팅  (0) 2015.03.05

Git 초기 셋팅

Git 2015. 3. 5. 15:12

Git 설치 후 다음 단계를 진행하여 전역으로 Git 접속 정보를 등록해 놓는다.


Git 설치는 아래 주소를 참조하세요

http://blog.duboku.com/com/install-git-ubuntu/



1. 

git config --global user.name "John Doe"

git config --global user.email johndoe@example.com


2.

git config --global credential.helper store

git clone http://example.com/repo.git

Username: <type your username>

Password: <type your password>


# cdedential uset 방법

git config --unset --global credential.helper


3. new branch

// 로컬 생성 

git checkout -b <branch>

'Git' 카테고리의 다른 글

git ignore 파일 만들기  (1) 2015.12.28
브랜치 생성, 삭제, 변경  (0) 2015.08.26