[Git] directory에 다른repository가 이미 연결되어있는 경우라면?
이미 directory에 다른 repository가 있는 경우라면,
기존 repository를 삭제하고 새로운 repository를 연결시켜주면 된다.
git remote remove origin
git add .
git commit -m "내용"
git remote add origin 주소
git push origin master
매우 간단하다!
물론 git init 한 후에 설정하는 것이다~
'📘 etc > Git' 카테고리의 다른 글
[Git] .gitignore 파일을 통해 특정 파일 업로드하지 않기 (0) | 2022.06.21 |
---|---|
[Git] Error : adding embedded git repository (0) | 2022.06.21 |
[Git] pull VS fetch VS clone (0) | 2022.06.21 |
[Git] master가 아닌 branch에 코드 올리기 (0) | 2022.06.21 |
[Git] 코드를 원격 저장소 github repository에 업로드하기 (macOS) (0) | 2022.06.21 |
최근댓글