gitlab creat project 및 배포후 작업
new project > creat blank project (readme 제거) > project name(typescript-travel-stage-01-01)
Command line instructions
You can also upload existing files from your computer using the instructions below.
Git global setup
git config --global user.name "찬익 박"
git config --global user.email "piaocanyi1997@gmail.com"
Create a new repository
git clone https://gitlab.com/nextree-kr2302/kr23022/typescript-travel-stage01-01.git
cd typescript-travel-stage01-01
git switch -c main
touch README.md
git add README.md
git commit -m "add README"
git push -u origin main
Push an existing folder
cd existing_folder
git init --initial-branch=main
git remote add origin https://gitlab.com/nextree-kr2302/kr23022/typescript-travel-stage01-01.git
git add .
git commit -m "Initial commit"
git push -u origin main
Push an existing Git repository
cd existing_repo
git remote rename origin old-origin
git remote add origin https://gitlab.com/nextree-kr2302/kr23022/typescript-travel-stage01-01.git
git push -u origin --all
git push -u origin --tags
error: src refspec master does not match any
https://0ver-grow.tistory.com/1102
[해결방법] error: src refspec master does not match any
상황 : git push origin master 입력하니 error: src refspec master does not match any 발생 원인 : 깃허브에서 pull 없이 push할 경우 기존 내용 삭제 문제가 생길 수 있기 때문. 해결 방법 : git init git add . git commit -m "
0ver-grow.tistory.com
Git Remote origin already exists 에러해결 remote origin 삭제 [Git]
https://daily50.tistory.com/334
Git Remote origin already exists 에러해결 remote origin 삭제 [Git]
Git의 Remote origin already exists 에러는 기존에 연결되어있는 레파지토리가 다시 새로운 레파지토리에 소스코드를 올리려고 하면 발생되는 에러이다. 필자의 경우, remote origin 을 잘못입력해서 수행
daily50.tistory.com
On branch master
nothing to commit, working tree clean
원격에서 그냥 빈 프로젝트를 만들경우 commit 할때 빈 프로젝트로 commit
git commit --allow-empty -m "Empty-Commit"
git push origin main