스프링 스타터 프로젝트 HelloWorld GitHub 올리기

1 개요[편집]

스프링 스타터 프로젝트 HelloWorld GitHub 올리기
여기서는 원격저장소인 GitHub에 올릴 것으로, 따로 Git을 설치하여 작업함

2 사전작업[편집]

3 GitHub 저장소 생성[편집]

16px-Crystal_Clear_app_xmag.svg.png GitHub 저장소 생성 문서를 참고하십시오.
  • https://github.com/ 접속, 로그인
  • 우상단 내비바의 + 클릭 --- New repository
  • Repository name: 저장소명(여기서는 HelloWorld)
  • [Create repository] 클릭

4 git push[편집]

  • 윈도우 D:\workspace-sts\HelloWorld 폴더창 열기
  • 빈공간 우클릭 --- 여기서 명령 창 열기(W0
git config --global user.name "이름"
git config --global user.email "이메일주소"
git init
git add -A
git commit -m "first commit"
git remote add origin https://github.com/계정명/저장소명.git
git push -u origin master
D:\workspace-sts\HelloWorld>git config --global user.name "jmnote"

D:\workspace-sts\HelloWorld>git config --global user.email "jmnote@example.com"
D:\workspace-sts\HelloWorld>git init
Initialized empty Git repository in D:/workspace-sts/HelloWorld/.git/

D:\workspace-sts\HelloWorld>git add -A
warning: LF will be replaced by CRLF in .gitignore.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in .mvn/wrapper/maven-wrapper.properties.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in mvnw.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in mvnw.cmd.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in pom.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in src/main/java/com/example/HelloWorldApplication.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in src/test/java/com/example/HelloWorldApplicationTests.java.
The file will have its original line endings in your working directory.
D:\workspace-sts\HelloWorld>git commit -m "first commit"
[master (root-commit) 8573caa] first commit
 9 files changed, 472 insertions(+)
 create mode 100644 .gitignore
 create mode 100644 .mvn/wrapper/maven-wrapper.jar
 create mode 100644 .mvn/wrapper/maven-wrapper.properties
 create mode 100644 mvnw
 create mode 100644 mvnw.cmd
 create mode 100644 pom.xml
 create mode 100644 src/main/java/com/example/HelloWorldApplication.java
 create mode 100644 src/main/resources/application.properties
 create mode 100644 src/test/java/com/example/HelloWorldApplicationTests.java
D:\workspace-sts\HelloWorld>git remote add origin https://github.com/jmnote/HelloWorld.git

D:\workspace-sts\HelloWorld>git push -u origin master
Username for 'https://github.com/': jmnote
Password for 'https://jmnote@github.com/': P@ssw0rd
Counting objects: 23, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (16/16), done.
Writing objects: 100% (23/23), 46.43 KiB | 0 bytes/s, done.
Total 23 (delta 0), reused 0 (delta 0)
To https://github.com/jmnote/HelloWorld.git
 * [new branch]      master -> master
Branch master set up to track remote branch master from origin.

D:\workspace-sts\HelloWorld>

5 같이 보기[편집]

6 참고[편집]