Infra/git

GIT remote

2022. 6. 21. 11:25
반응형

remote

  • 작업 중인 local branch 연결된 저장소 확인
git remote -v
git remote remove origin //연결 삭제
git remote add origin {brach} //신규 연결
  • first local branch를 remote 로 push
git init
git remote add origin {git repository}
git add .
git commit -m "initial commit"
git push -u origin master
  • remote branch 잘못 올라간 파일 삭제
git rm --cached -r <file or folder>  //.gradle
git add .
git push origin master
반응형

'Infra > git' 카테고리의 다른 글

GIT cherry-pick  (0) 2022.06.21
GIT checkout  (0) 2022.06.21
GIT status  (0) 2022.06.21
GIT pull  (0) 2022.06.21
Git fetch  (0) 2022.06.21

GIT status

2022. 6. 21. 11:24
반응형

status

  • 작업 중인 local branch 변경 상태 확인
git status
반응형

'Infra > git' 카테고리의 다른 글

GIT checkout  (0) 2022.06.21
GIT remote  (0) 2022.06.21
GIT pull  (0) 2022.06.21
Git fetch  (0) 2022.06.21
GIT log  (0) 2022.06.21

GIT pull

2022. 6. 21. 11:23
반응형

pull

  • remote repository에 변경사항을 local repository로 fetch 후 merge
git pull
반응형

'Infra > git' 카테고리의 다른 글

GIT remote  (0) 2022.06.21
GIT status  (0) 2022.06.21
Git fetch  (0) 2022.06.21
GIT log  (0) 2022.06.21
GIT init  (0) 2022.06.21

Git fetch

2022. 6. 21. 11:22
반응형

fetch

  • remote repository에 변경사항을 local repository로 가져만 옴
git fetch
반응형

'Infra > git' 카테고리의 다른 글

GIT status  (0) 2022.06.21
GIT pull  (0) 2022.06.21
GIT log  (0) 2022.06.21
GIT init  (0) 2022.06.21
GIT 명령어  (0) 2022.04.07

GIT log

2022. 6. 21. 11:21
반응형

log

  • git 이력
git log //remote 포함
git log --branches --not --remotes //local
반응형

'Infra > git' 카테고리의 다른 글

GIT status  (0) 2022.06.21
GIT pull  (0) 2022.06.21
Git fetch  (0) 2022.06.21
GIT init  (0) 2022.06.21
GIT 명령어  (0) 2022.04.07

+ Recent posts

반응형