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 NavigationViewController_tutorial % git push -u origin main
Enumerating objects: 37, done.
Counting objects: 100% (37/37), done.
Delta compression using up to 10 threads
Compressing objects: 100% (35/35), done.
Writing objects: 100% (37/37), 30.79 KiB | 10.26 MiB/s, done.
Total 37 (delta 3), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (3/3), done.
To https://~~ 깃허브 새로 생성한 repository주소 뜨는 부분
* [new branch] main -> main
Branch 'main' set up to track remote branch 'main' from 'origin'.
~@~-MacBookPro NavigationViewController_tutorial %
위에처럼 문구가 뜨는데 다 된 것 같기도 하다. 왜냐면 github 페이지 들어가서 보면 파일 다 들어가있기 때문.
그래도 생활코딩 -이고잉님 - 지옥에서 온 git 복습해야할듯.
'Git' 카테고리의 다른 글
여러 repositories 하나로 합치기 (0) | 2023.02.03 |
---|---|
remote origin already exists. 에러 뜰때 해결방법 (0) | 2022.04.26 |