git 명령어 더 알아두기

김초록·2021년 4월 8일
0

git

목록 보기
2/2

.git 파일 삭제

$ rm -rf .git

git init

$ git init
$ git add .
# 모든 파일 stage 에 올리기
$ git commit -m 'initial commit'
$ git remote add origin <깃헙 레포지토리 URL>
$ git push origin master -f

git push 레포지토리 주소 접근 권한 없을시

$ git remote set-url origin "https://github-username@github.com/github-username/github-repository-name.git
  • git remote add origin gitreposit주소.git 으로 origin 명칭을 만들었지만 주소에 접근 권한을 없는상태였던 것이므로 인증필요

git push

$ git push -u origin master 
# git hub 패스워드 입력
  • git default branch 변경
    : setting -> Branches -> Default branch 변경 후 업데이트
profile
개발 몰라몰라

0개의 댓글