wasup
git) note - init pull and push / .gitignore / failed to push some refs to ~ 해결방법 본문
git) note - init pull and push / .gitignore / failed to push some refs to ~ 해결방법
wasupup 2022. 8. 29. 15:36git 저장소 생성 후 원하는 파일 위치에서
git init
git remote add origin [http://github.com/userName/repositorysName.git
git remote #확인
git pull origin main
gitignore 파일 만들기
vi .gitignore
내용 작성
저장 :wq
.gitignore 간단하게 만들기
1. 처음부터 .igtignore 파일을 만들 경우 프로젝트 디렉터리로 이동한 뒤 아래의 명령어를 쳐보자. $ vim .gitignore 그러면 아래와 같이 보일것이다. 이제 [입력모드]로 들어가서 Git 에게 무시받을 정
gbsb.tistory.com
git commit
git add -A
warning : LF will be replaced by CRLF in .gitignore.
the file will have its original line endings in your working directory
.gitignore에서 LF는 CRLF로 대체됩니다.
파일은 작업 디렉토리에서 원래 줄 끝을 갖습니다.
->
구글링해서 여러방법을 찾아봤으나
status 찍어봐도 아무런 변동사항 없고
pull -> marge -> push 를 반복해도 같은 오류가 나서
-f 옵션을 사용
git push -f origin
git branch -m main
git remote
git commit -m "git commit"
git push -u origin main
src refspec master does not match any 해결방법
문제 : 로컬 저장소에 있는 프로젝트를 깃허브로 push하던 중 다음과 같은 에러를 마주했다. 해결해보자. 터미널로 해당 프로젝트 폴더로 이동이 분은 갓스택오버플로우의 도움을 받아 해결이 됐
velog.io
error:failed to push some refs to 에러 해결법
이런 상황은 주로 git Repository 를 git clone 하고 push 하면 나오는 현상일텐데 여러 해결방법을 끄적끄적해보겠슴당이 에러가 무슨 뜻인냐면github에 내 Local 에 없는 파일이 있고, 내 파일을 push 할 면
velog.io
'IT etc > Git' 카테고리의 다른 글
git ) note - 오류 the current branch master has no upstream branch. / src refspec master does not match any / please commit your changes or stash them before you merge (0) | 2022.08.29 |
---|---|
Git) 호스팅 사용하기 (0) | 2021.07.21 |
Git) 에러 'git push --set-upstream main master' (0) | 2021.07.21 |
Git) 에러 'index.lock' (0) | 2021.07.21 |
Git) merge 충돌!! (0) | 2021.07.11 |