Dev metacog/DevOps

로컬의 신규 프로젝트를 github로 push

잘 배우고, 잘 익히기 2021. 3. 14. 14:11
1) github에서 repository 생성 2) 로컬에서 가이드에 따라 수행 3) Repository 내 프로젝트 확인 

 

1) github : New 버튼을 눌러 생성 

2) github의 "create a new repository on the command line" 가이드에 따라 수행 

 

MINGW64 /d/GitHub/SpringBoot (master)
$ echo "# SpringBoot" >> README.md
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/metacogpe/SpringBoot.git
git push -u origin main
MINGW64 /d/GitHub/SpringBoot (master)
$ git init
Reinitialized existing Git repository in D:/GitHub/SpringBoot/.git/

MINGW64 /d/GitHub/SpringBoot (master)
$ git add README.md
warning: LF will be replaced by CRLF in README.md.
The file will have its original line endings in your working directory

MINGW64 /d/GitHub/SpringBoot (master)
$ git commit -m "first commit"
[master (root-commit) 0bf893c] first commit
 Committer: 
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly. Run the
following command and follow the instructions in your editor to edit
your configuration file:

    git config --global --edit

After doing this, you may fix the identity used for this commit with:

    git commit --amend --reset-author

 15 files changed, 426 insertions(+)
 create mode 100644 README.md
 create mode 100644 firstproject/.gitignore
 create mode 100644 firstproject/build.gradle
 create mode 100644 firstproject/gradle/wrapper/gradle-wrapper.jar
 create mode 100644 firstproject/gradle/wrapper/gradle-wrapper.properties
 create mode 100644 firstproject/gradlew
 create mode 100644 firstproject/gradlew.bat
 create mode 100644 firstproject/settings.gradle
 create mode 100644 firstproject/src/main/java/com/example/firstproject/FirstprojectApplication.java
 create mode 100644 firstproject/src/main/java/com/example/firstproject/controller/FirstController.java
 create mode 100644 firstproject/src/main/resources/application.properties
 create mode 100644 firstproject/src/main/resources/static/hello.html
 create mode 100644 firstproject/src/main/resources/templates/goodbye.mustache
 create mode 100644 firstproject/src/main/resources/templates/greetings.mustache
 create mode 100644 firstproject/src/test/java/com/example/firstproject/FirstprojectApplicationTests.java

1102680@SKT1102680PN013 MINGW64 /d/GitHub/SpringBoot (master)
$ git branch -M main

MINGW64 /d/GitHub/SpringBoot (main)
$ git remote add origin https://github.com/metacogpe/SpringBoot.git

MINGW64 /d/GitHub/SpringBoot (main)
$ git push -u origin main
Enumerating objects: 35, done.
Counting objects: 100% (35/35), done.
Delta compression using up to 8 threads
Compressing objects: 100% (22/22), done.
Writing objects: 100% (35/35), 58.69 KiB | 5.87 MiB/s, done.
Total 35 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1/1), done.
To https://github.com/metacogpe/SpringBoot.git
 * [new branch]      main -> main
Branch 'main' set up to track remote branch 'main' from 'origin'.

MINGW64 /d/GitHub/SpringBoot (main)

3) 확인 : 신규로 push된 Repository 확인 가능 

   - 여기서는 SpringBoot Repository 확인 가능 

  ㅇ SpringBoot 레파지토리 내에 firstproject 확인 가능