[Git] How to push to an empty repository

Juri Jeong·2022년 11월 9일
1

Git

목록 보기
1/3

상황 Situation

1.iOS 프로젝트를 생성 함
2.Xcode 안에서 New repository를 누름.
3.GitLab에 빈 repo가 생성된 상황.

1.Created an iOS project
2.Pressed New repository in Xcode.
3.The situation in which an empty repo was created in GitLab.

해결 방법 Solution

git add .
git commit -m
git commit -m "Add existing project files before sending GitLab."
get remote add source https://gitlab.com/username/repositoryname.git
git push --set-upstream source main
username=토큰이름(token name)
password=토큰 적어주기(token)

해결완료~!

reference

https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/How-to-add-and-push-an-existing-project-to-GitLab

0개의 댓글