1. git 설정

git config --global user.name "Your Name"

git config --global user.email "email@domain.com"

git config --global core.editor "vim"

git config --list

 

2. 파일무시

.gitignore

 

3. git project init  

mkdir test

cd test

git init

 

4. git 설정 보기 

ls .git/config

git config -l

 

5. git 소스 추가

git status

git add test.txt

git commit -m “test”

 

6. git log 및 소스비교 

git log

git show a3erewrwer

diff —git a/test.txt b/test.txt

 

7. git 소스 원복

# 원래껄로 되돌림

git revert a3erewrwer  

git reset a3erewrwer

 

8. git branch 확인 및 합치기 

git branch

git checkout master

git merge dev master

 

9. remote(github) 소스 올리기

git remote add gittest https://github.com/test/test.git

git remote -v

 

#소스 올리기(새로 바뀐 부분)

git push gittest master 

 

#소스 다운(새로 바뀐 부분)

git pull gittest master

 

# 소스 copy

git clone https://github.com/test/test.git

 

 

 

 

'GIT' 카테고리의 다른 글

git command  (0) 2017.05.09

+ Recent posts