Post

How to bring IntelliJ project to already existing github repository?

1. Make an intelliJ project with SpringBoot

만들 때 스프링부트 가지고 실행
Screenshot 2024-04-17 at 01 07 39

2. I dont have a github repository yet

이 경우는 쉽다.
git으로 가서 share project on github

Screenshot 2024-04-17 at 01 29 15

3. I have a github repository already

이럴 경우에는 manage remotes
Screenshot 2024-04-17 at 01 29 42

그리고 깃허브 url을 넣어준다.

Screenshot 2024-04-17 at 01 11 17


깃허브 url이라 하면 바로 여기있는 url

Screenshot 2024-04-17 at 01 12 25

그리고 commit을 보면 springboot설치하면서 변경된 내용들을 커밋하라고 나온다.
Screenshot 2024-04-17 at 01 13 57

하지만 우리는 커밋할 수가 없다. 왜냐? 우리는 아직 메인브랜치가 없기 때문이다.
Screenshot 2024-04-17 at 01 16 32

그러니까 터미널에서 친절하게 알려준대로, 시키는대로 한다.

1
git push --set-upstream origin main


Screenshot 2024-04-17 at 01 17 55

그러면 짠! 스프링부트가 설치되어 커밋된 우리의 프로젝트를 볼 수 있다.

Screenshot 2024-04-17 at 01 31 34

4. 참고자료

https://velog.io/@ssoop/%EA%B9%83%ED%97%88%EB%B8%8CGitHub-%EC%97%B0%EB%8F%99%ED%95%98%EA%B8%B0-Spring-Boot-IntelliJ

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