Home [git] 원격저장소 초기화
Post
Cancel

[git] 원격저장소 초기화

Git 초기화 순서.



1 로컬저장소의 .git 디렉토리 삭제

1
rm -rf ./.git


2 로컬 저장소에 초기화

1
git init


3 초기화된 파일 커밋

1
2
git add .
git commit -m "커밋 메세지" 


4 원격 저장소 연결

1
git remote add origin (원격저장소 url)


5 마지막으로 psuh

1
git push --force --set-upstream origin (브랜치이름 main, master..)





git push –force –set-upstream A B


최초 push 시 로컬저장소의 원격저장소를 지정해주어야 한다.


로컬 저장소인 A의 원격저장소를 B지정해 push 한다는 의미이다.

최초 한번만 설정해주면 다음 push 부터는 git push 만으로 push가 가능해진다.

This post is licensed under CC BY 4.0 by the author.

[jdbc] connection pool

[http] stateful vs stateless