본문 바로가기
Git

자주사용하는 Git 명령어

by Tedi__ 2019. 7. 3.

자주 사용하는 Git 명령어

1. git repository 생성

git init

2. git 파일의 상태 확인

git status

3. 원격지에서 소스코드 가져오기

git clone remote_path

4. 브랜치 선택 및 추가

git checkout branc_name

5. 원격 브랜치 목록 조회

git branch -r

6. 로컬 브랜치 목록 조회

git branch -a

7. 브랜치 이름 바꾸기

git branch -m branch_name chage_name

8. 로컬 브랜치 삭제하기

git branch -d branc_name

9. git remote url 변경하기

git remote set-url origin change_origin_url

10. git push

git push origin master

11. git pull

git pull

12. git 계정 변경

git config --global user.name "user_name" // name 변경
git config --global user.email "user_email" // mail 변경

'Git' 카테고리의 다른 글

GitFlow 기법을 사용한 브랜치 전략  (0) 2019.07.03

댓글