상세 컨텐츠

본문 제목

git관련 명령어들

Programming/git

by 노란날. 2021. 9. 14. 13:00

본문

반응형

###########git start
##참고 : https://2hyes.tistory.com/91

## 로그인
git config --global user.name "hgyeong"
git config --global user.email "hgyeong.kim@partner.samsung.com"


##
git branch -m main dev
git fetch origin
git branch -u origin/main main



### .git 파일 생성
git init

### 선택한 프로젝트 폴더 내의 **모든** 파일 버전 관리 (만약, 특정파일만 하고 싶다면 git add a.py 형식으로 써도 무방하다.)
git add .
//git add * - add취소

### 버전 관리 tracking. 업그레이드 된 것은 untracking이라고 빨간 글씨로 뜸
git status

### 커밋!
git commit -m "node.js commit"


### git 저장소와 연결
git remote add origin http://3.36.9.110:8443/searchp6/esqueryprocess.git

git remote add origin http://3.36.9.110:8443/esearch/es_backoffice.git

git remote -v //확인


git branch -u origin/main main
//git remote -v  : 확인

### github에 push(업로드)
git push -u origin master

git push -f origin master //강제푸시


#################git end



##git 설정확인
command
git config --list

##프록시 설정
command
git config --global http.proxy http://70.10.15.10:8080/



##clone

git clone http://3.36.9.110:8443/searchp6/esqueryprocess.git




////////////////////////////////////////////////////////

git branch -m master dev
git fetch origin
git branch -u origin/main main

git rm file //git과 로컬의 파일삭제

git rm --cached file //git 파일만 삭제



취소
https://gmlwjd9405.github.io/2018/05/25/git-add-cancle.html

커밋취소
git reset --hard d678197

////////////////////////////////////////////////////////

연결된 github없음.

fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.


git config --system --unset credential.helper





////////////////////////////////////////////////////////
push 용량초과

Enumerating objects: 5894, done.
Counting objects: 100% (5894/5894), done.
Delta compression using up to 16 threads
Compressing objects: 100% (5496/5496), done.
error: RPC failed; HTTP 403 curl 22 The requested URL returned error: 403
send-pack: unexpected disconnect while reading sideband packet
Writing objects: 100% (5894/5894), 5.01 MiB | 2.83 MiB/s, done.
Total 5894 (delta 1290), reused 0 (delta 0), pack-reused 0
fatal: the remote end hung up unexpectedly
Everything up-to-date


//////////////////////////////////////////////////////

유용한사이트
https://backlog.com/git-tutorial/kr/reference/config.html



반응형

관련글 더보기