forked from johnhongtony/katsstudy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommand.txt
More file actions
54 lines (39 loc) · 1.42 KB
/
command.txt
File metadata and controls
54 lines (39 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//민수 깃
https://github.com/math6646/minsuTest.git
//내 로컬 저장소 만들기
git init
//로컬 저장소 에서 스테이지로 add 하기
git add . 또는 git add 파일명
git commit
//로컬 저장소와 소스파일 상태 확인하기
git status
//해당 원격 저장소의 내용들을 복제해옴
git clone https://github.com/khsin510/katsstudy.git
//해당 원격 저장소 연결
git remote add origin https://github.com/khsin510/katsstudy.git
//저장된 원격 저장소 확인
git remote -v
//파일 원상태로 되돌리기 스테이지에 add전 되돌리기
git checkout test.txt
//파일 원상태로 되돌리기 스테이지에 add후 스테이지상 있을 시 되돌리기
git reset test.txt
//원격저장소에 파일 올리기
git push origin master
//원격저장소에 파일 다운받기
git pull origin master
//어떤 branch가 있는지 확인 하고 싶을 경우
git branch (이때 * 표시는 현재 선택 되어져 있는 branch)
//branch를 생성 하고 자 할 경우
git branch (생성하고자 하는 branch 명)
ex> git branch test1
//branch 변경 하고 자 할 경우
git checkout (변경하고자 하는 branch 명)
ex> git checkout test1
ex> git checkout master
//두 branch 병합 하고 자 할 경우
git merge (생성한 branch)
ex> git merge test1
//branch을 삭제 하고 자 할 경우
git branch -d (삭제하고자 하는 branch 명)
ex> git branch -d test1