[출처] http://confluence.invesume.com:8090/pages/viewrecentblogposts.action?key=A1¤tPage=1
git pull/push 시 자동 트래킹 브랜치 설정하는 부분에 버전 별 오류가 있어 수정함.
Using git v1.8.0 or later:
git branch branch_name --set-upstream-to your_new_remote/branch_name
Or you can use the -u switch:
git branch branch_name -u your_new_remote/branch_name
Using git v1.7.12 or earlier:
git branch --set-upstream branch_name your_new_remote/branch_name
# 설정git config --global user.name "Your Name Here"git config --global user.email "your_email@youremail.com"# 클론git clone https://github.com/ivsteam/hamonikr.git# 특정 브랜치 클론git clone -b 브랜치명 https://github.com/ivsteam/hamonikr.git# 브랜치 생성# 로컬 PC 에서 브랜치 생성후 이동git checkout -b 브랜치명# 원격 저장소에 브랜치 생성git push origin 브랜치명# 다음 push/pull 사용시 원격 저장소의 브랜치를 자동 사용하도록 세팅git branch --set-upstream-to=origin/브랜치명# 브랜치 삭제# 삭제하려는 브랜치 이외의 다른 브랜치로 이동git checkout master# 로컬 브랜치 삭제git branch -D 브랜치명# 원격 브랜치 삭제git push origin :브랜치명# 확인git status# 변경된 파일 추가git add 파일명# 변경된 파일 전체 추가git add -A# 커밋git commit -m 'your message'# 푸시git push# 풀git pull# Cache 삭제git rm -r --cached .git add .git commit -m 'cache clear''GIT' 카테고리의 다른 글
| git the requested URL returend error : 403 해결방법 (2) | 2020.02.26 |
|---|---|
| commit, push 삭제 (0) | 2019.07.15 |
| [Git] git add 취소하기, git commit 취소하기, git push 취소하기 (0) | 2018.12.18 |
| 자주 사용하는 기초 Git 명령어 정리하기 (0) | 2018.12.17 |
| git 사용시 커밋하지 않은 변경사항들을 다른 브랜치에 커밋하기 (0) | 2018.06.01 |