Git 3

여러 repositories 하나로 합치기

연습하면서 여러 개의 repositories 생성했던거 하나의 repository 로 합치기 0. Github 원격 저장소에 새로운 repository 빈걸로 생성 1. git clone { 위에서 새로 생성한 repository 주소 } //원격 저장소를 local로 클론하는 작업 2. cd { 방금 생성한 repository가 local에 저장된 위치 경로 } 3. git subtree add --prefix={폴더 이름} {repository 주소} {branch 이름} -> 이 과정에서 오류가 날 경우 (ambiguous argument 'HEAD': unknown revision or path not in the working tree.' ) -> 해결 방법: git commit --allow-..

Git 2023.02.03

remote origin already exists. 에러 뜰때 해결방법

https://donggu1105.tistory.com/10 [Git] fatal: remote origin already exists. 에러 뜰때 해결방법 github에 터미널을 이용해서 프로젝트 올릴때 fatal: remote origin already exists. 에러가 뜬다면 원래있던 remote를 삭제하고 다시 add시켜준다. $ git remote rm origin 그다음 git remote add origin ~~ 하.. donggu1105.tistory.com remote origin already exists. 에러가 뜬다면 원래있던 remote를 삭제하고 다시 add시켜준다. git remote rm origin 그다음 git remote add origin ~~ 주소 복붙 하면 해결

Git 2022.04.26

[Mac] 맥 사용하여 터미널로 깃허브에 올리기

androidstudio project or iOS project(by xcode) => 터미널 이용해서 github에 올리는 방법 ​ cd Desktop/AndroidStudioProjects/해당 폴더 이름 (올리고 싶은 폴더를 파인더에서 터미널로 끌어다 쓰면 됨) git init git add . git commit -m "message" git branch -M main git remote add origin https:// repository 주소 github에서 복붙해오기 ~~.git git push -u origin main ​ 이거 위에 내용들은 github에서 찾을 수 있다. ​ ​ 매번 github에 올릴 때마다 마지막에 branch~~ 나와서 좀 찜찜 . ~@~-MacBookPro N..

Git 2022.04.22