# github

1. Installation git
2. Set git bash
a. configure user name
`git config --global user.name "your_name"`
b. configure email address
`git config --global user.email "your_email"`
c. check configuration info
`git config --list`
3. github clone
`git clone {git url} {branch name}`
4. create branch to github
`git checkout -b {branch name}`
5. add files - git add *{files}*
`git add .`
6. commit - make history
`git commit -m 'my first commit'`
7. pull - git pull *{remote}* *{branch}*
`git pull origin main`
8. push - git push *{remote}* *{branch}*
`git push origin ksr01`
9. pull request

---

---

---

---

---

10. etc command
a. check branch list and now branch - in local
`git branch`
b. change branch - in local
`git checkout {branch name}`
c. show remote info
`git remote -v`
d. 현재 작업 브랜치 확인
`git branch`
11. 개별 브랜치에서 작업 시 메인 브랜치 머지하기
a. 로컬의 main 브랜치로 이동
`git checkout main`
b. github main 브랜치 pull
`git pull`
c. 로컬의 내 브랜치로 이동
`git checkout ksr`
d. main 브랜치 내 브랜치로 병합
`git merge main`
e. 병합할 내용들 확인 후 내 브랜치로 push
`git push origin ksr`
f. github 에 접속하여 PR(Pull Request)