# 원격 브랜치 삭제
git push origin -d clothes
# branch 만들고, 이동
git checkout -b clothes
# 올릴 파일 리스트 업데이트
git add *
# 올릴 파일들에 대한 코멘트
git commit -m "revised list"
# 원격지에 올리기
git push
# 원격지에서 변경내역 받아오기
git pull
# 원격지랑 다른게 있어서 에러 뜰 때
1) 로컬에 있던 변경 내용을 잠깐 stash에 옮긴다. : git stash
2) 이제 원격지 내용을 가져온다 : git pull
3.1 ) 필요없는거면 그냥 버린다 : git stash drop
3.2 ) stash 에 옮겼던거 덮어쓴다 : git stash pop
# git commit 취소
$ git reset HEAD^ // 위와 동일
$ git reset HEAD~2 // 마지막 2개의 commit을 취소
https://gmlwjd9405.github.io/2018/05/25/git-add-cancle.html
# 특정 브랜치만 pull 하기
git pull origin <branch name>
# 특정 브랜치만 clone 하기
git clone -b {branch_name} --single-branch {저장소 url}
# 특정 브랜치 이름 변경
git branch -m 원본브랜치 바뀐이름
# 관리 파일 삭제
git rm --cached -r Paint-by-Example (원격지에서 삭제)
git rm: 로컬과 원격 저장소 모두에서 파일 혹은 경로 삭제
# 원격 저장소에서만 삭제
1) git rm --cached b.txt
2) git commit -m "텍스트"
3) git push master "branch 이름"
# 원격 저장소 변경
git remote set-url origin <새로운GITURL>
error: RPC failed; curl 56 GnuTLS recv error (-9): Error decoding the received TLS packet.
위 에러 발생시 아래 구문 셋팅 (http 캐싱에 충분치 않음?)
git config --global http.postBuffer 524288000
git config --global http.postBuffer 1048576000
git config --global http.sslVerify false
* tip : 파일이 클 경우 git lfs install은 꼭 해주고 시작하자.
'이거슨 상식!' 카테고리의 다른 글
vscode 파일 날라갔을때, 여기 저장되어있을수도 있으니 시간순으로 뒤지기 (0) | 2023.10.23 |
---|---|
tmux 단축키 정리 (0) | 2023.08.06 |
[aihub 데이터처리] 특수문자 제거 (한줄 명령어, code포함) (0) | 2023.03.21 |
visual block, shell 주석처리 하는법 [키보드만 사용][매우 쉬움!!][그림설명] (0) | 2023.03.21 |
git detached HEAD 연결하기 (0) | 2023.01.09 |