한바다
git hub 연결 오류 해결 본문
☑️ 저번주 금요일 git 브랜치"로컬저장소 변경사항이 원격저장소에 반영이 되지 않아 병합merge하라고 떳던"
오류는 아래와 같이 해결 되었다.
C:\Users\user1\hanbatang>git add .
C:\Users\user1\hanbatang>git commit -m"hanbatang start"
On branch jinhwa2-register
Your branch is ahead of 'origin/jinhwa2-register' by 3 commits.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
C:\Users\user1\hanbatang>git push
Enumerating objects: 77, done.
Counting objects: 100% (63/63), done.
Delta compression using up to 6 threads
Compressing objects: 100% (35/35), done.
Writing objects: 100% (39/39), 20.46 KiB | 5.11 MiB/s, done.
Total 39 (delta 14), reused 2 (delta 0), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (14/14), completed with 6 local objects.
To https://github.com/jaewon0123/hanbatang.git
8cc68fb..bfd9904 jinhwa2-register -> jinhwa2-register
C:\Users\user1\hanbatang>git branch
* jinhwa2-register
master
☑️ 위와 같은 오류가 해결 된 후 조원끼리 각자 작업한 브랜치 내용을 합치는 작업을 진행 하였다.
✔️ 첫번째로 현재 branch 와 branch up to date(최신) 인지 확인해주는 명령어 git status를 입력하였고
C:\Users\user1\hanbatang>git status
On branch jinhwa2-register
Your branch is up to date with 'origin/jinhwa2-register'.
nothing to commit, working tree clean
C:\Users\user1\hanbatang>git checkout master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
✔️두번째로 git branch를 입력하여 현재 내 브랜치명을 확인 했다.
C:\Users\user1\hanbatang>git branch
jinhwa2-register
* master
✔️세번째로 내 브랜치로 병합하였다.
C:\Users\user1\hanbatang>git merge jinhwa2-register
Updating 9fe2786..bfd9904
Fast-forward
hanbatang/pom.xml | 5 +
.../com/hanbatang/controller/MailController.java | 26 +++
.../com/hanbatang/controller/MainController.java | 12 ++
.../com/hanbatang/controller/MemberController.java | 34 ++++
.../src/main/java/com/hanbatang/dto/Member.java | 23 +++
.../java/com/hanbatang/mapper/MemberMapper.java | 11 ++
.../java/com/hanbatang/service/EmailService.java | 48 +++++
.../java/com/hanbatang/service/MemberService.java | 26 +++
.../src/main/java/com/hanbatang/vo/MailVo.java | 10 ++
.../src/main/resources/application.properties | 18 ++
.../src/main/resources/static/css/mainCategory.css | 173 ++++++++++++++++++
hanbatang/src/main/resources/static/css/styles.css | 93 ++++++++++
.../src/main/resources/static/image/chatbot.png | Bin 0 -> 5737 bytes
.../src/main/resources/static/image/hanbatang.png | Bin 0 -> 2000 bytes
.../main/resources/static/image/parianMarble.jpg | Bin 0 -> 11046 bytes
hanbatang/src/main/resources/static/image/top.png | Bin 0 -> 3672 bytes
.../src/main/resources/static/js/javascrip.js | 96 ++++++++++
.../src/main/resources/templates/editAddress.html | 153 ++++++++++++++++
.../src/main/resources/templates/editMember.html | 164 +++++++++++++++++
.../src/main/resources/templates/getMyPage.html | 163 +++++++++++++++++
hanbatang/src/main/resources/templates/login.html | 110 ++++++++++++
.../src/main/resources/templates/mainPage.html | 97 ++++++++++
.../resources/templates/mapper/MemberMapper.xml | 20 +++
.../main/resources/templates/member-register.html | 199 +++++++++++++++++++++
.../src/main/resources/templates/memberBye.html | 118 ++++++++++++
.../src/main/resources/templates/success.html | 11 ++
26 files changed, 1610 insertions(+)
create mode 100644 hanbatang/src/main/java/com/hanbatang/controller/MailController.java
create mode 100644 hanbatang/src/main/java/com/hanbatang/controller/MainController.java
create mode 100644 hanbatang/src/main/java/com/hanbatang/controller/MemberController.java
create mode 100644 hanbatang/src/main/java/com/hanbatang/dto/Member.java
create mode 100644 hanbatang/src/main/java/com/hanbatang/mapper/MemberMapper.java
create mode 100644 hanbatang/src/main/java/com/hanbatang/service/EmailService.java
create mode 100644 hanbatang/src/main/java/com/hanbatang/service/MemberService.java
create mode 100644 hanbatang/src/main/java/com/hanbatang/vo/MailVo.java
create mode 100644 hanbatang/src/main/resources/static/css/mainCategory.css
create mode 100644 hanbatang/src/main/resources/static/css/styles.css
create mode 100644 hanbatang/src/main/resources/static/image/chatbot.png
create mode 100644 hanbatang/src/main/resources/static/image/hanbatang.png
create mode 100644 hanbatang/src/main/resources/static/image/parianMarble.jpg
create mode 100644 hanbatang/src/main/resources/static/image/top.png
create mode 100644 hanbatang/src/main/resources/static/js/javascrip.js
create mode 100644 hanbatang/src/main/resources/templates/editAddress.html
create mode 100644 hanbatang/src/main/resources/templates/editMember.html
create mode 100644 hanbatang/src/main/resources/templates/getMyPage.html
create mode 100644 hanbatang/src/main/resources/templates/login.html
create mode 100644 hanbatang/src/main/resources/templates/mainPage.html
create mode 100644 hanbatang/src/main/resources/templates/mapper/MemberMapper.xml
create mode 100644 hanbatang/src/main/resources/templates/member-register.html
create mode 100644 hanbatang/src/main/resources/templates/memberBye.html
create mode 100644 hanbatang/src/main/resources/templates/success.html
✔️네번째로 git add 명령어를 입력했다.
C:\Users\user1\hanbatang>git add .
✔️다섯번째로 git pull 명령어를 입력했다.
C:\Users\user1\hanbatang>git pull
remote: Enumerating objects: 129, done.
remote: Counting objects: 100% (48/48), done.
remote: Compressing objects: 100% (28/28), done.
remote: Total 129 (delta 14), reused 46 (delta 14), pack-reused 81
Receiving objects: 100% (129/129), 28.98 MiB | 21.78 MiB/s, done.
Resolving deltas: 100% (18/18), completed with 9 local objects.
From https://github.com/jaewon0123/hanbatang
9fe2786..ea6376f master -> origin/master
2d91d0f..2dd280b kimjaewon-productpage -> origin/kimjaewon-productpage
11c8393..cd89512 leegyejun-mainpage -> origin/leegyejun-mainpage
b29b93b..257a9c6 sangjunchung-login -> origin/sangjunchung-login
Auto-merging hanbatang/src/main/java/com/hanbatang/controller/MainController.java
CONFLICT (add/add): Merge conflict in hanbatang/src/main/java/com/hanbatang/controller/MainController.java
Auto-merging hanbatang/src/main/java/com/hanbatang/service/EmailService.java
CONFLICT (add/add): Merge conflict in hanbatang/src/main/java/com/hanbatang/service/EmailService.java
Auto-merging hanbatang/src/main/resources/application.properties
CONFLICT (content): Merge conflict in hanbatang/src/main/resources/application.properties
Auto-merging hanbatang/src/main/resources/static/css/mainCategory.css
CONFLICT (add/add): Merge conflict in hanbatang/src/main/resources/static/css/mainCategory.css
Auto-merging hanbatang/src/main/resources/templates/login.html
CONFLICT (add/add): Merge conflict in hanbatang/src/main/resources/templates/login.html
Auto-merging hanbatang/src/main/resources/templates/mainPage.html
CONFLICT (add/add): Merge conflict in hanbatang/src/main/resources/templates/mainPage.html
Auto-merging productpage/pom.xml
Automatic merge failed; fix conflicts and then commit the result.
✔️여섯번째로 git add .를 다시 입력 후 git status -> 해당내용 git add . ->깃 커밋 ->깃 푸쉬
C:\Users\user1\hanbatang>git add .
C:\Users\user1\hanbatang>git commit -m "jinhwa2-register"
[master 43fa396] jinhwa2-register
C:\Users\user1\hanbatang>git push
Enumerating objects: 96, done.
Counting objects: 100% (95/95), done.
Delta compression using up to 6 threads
Compressing objects: 100% (38/38), done.
Writing objects: 100% (43/43), 9.39 KiB | 1.88 MiB/s, done.
Total 43 (delta 14), reused 0 (delta 0), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (14/14), completed with 13 local objects.
To https://github.com/jaewon0123/hanbatang.git
ea6376f..43fa396 master -> master
C:\Users\user1\hanbatang>
☑️ 위와 같이 조별과제를 합친 후 오류가 여러 방면에서 발생 하였다
✓ import가 되지 않았다
->임포트가 되지 않은것은 poem.xml이 다른데 숨겨져 있었는데 합치기전 기존파일 알집으로 보관해뒀던 것을
풀어서 푼 파일명을 "hanbatang_jinhwa로 저장하고 합친 폴더에 기존 poem.xml이 있는 것을 붙여 넣었다.
✓서로 충돌났던거를 지웠다
->우리한바탕조는 이메일인증과 비밀번호 인증에서 어노테이션이 충돌이 났다. 그래서 두개 중 비밀번호 인증을 보존하고
이메일인증은 삭제 하였다.
✓매퍼폴더가 두개여서 한개는 삭제 하였다.
✓나뭇잎모양 어플리케이션에 서버가 여러개여서 한개로 합쳤다
▶import가 되지 않은게 참 많이 당황스러웠는데 생각보다 간단해서 더 놀랐다.
그리고 합치기전 서로 소통하면서(조별 기획때 잘 듣기) 폴더이름 유사기능으로 겹치는것은 없는지 잘 확인해야 겠다.
결국 합친다는 것은 다시 생각해보면 그리 어렵지 않은 내용이였는데 처음 해보는 거라 어렵게 접근했던 것 같다.
그래서 경험은 값진 것이구나라고 생각 하였다!!
☑️ 그런데 아뿔사 합치고 났는데 서로 팀원들이 cmd창에서 깃풀 푸쉬등등 하는 과정에서 내 컴퓨터가 임포트가 안되기
전으로 원상복귀하였다. 결국은 기존 폴더를 삭제하고 아래와 같이 재설치 후 브랜치도 새로 만들고
브랜치에서 새로 작업한 후 깃 어드, 깃 커밋, 깃 푸쉬 후 마스트로 갈아 탄다음에 깃 풀하고 깃 merge(병합)한 후
git add . , git commit -m, git push 완료 후 git checkout 내 브랜치로 이동 하였다.
[cmd창에 입력했던 코드]
Microsoft Windows [Version 10.0.19045.4529]
(c) Microsoft Corporation. All rights reserved.
C:\Users\user1\hanbatang>git branch
* master
C:\Users\user1\hanbatang>git checkout -b jinhwa2-signMember
Switched to a new branch 'jinhwa2-signMember'
C:\Users\user1\hanbatang>git branch
* jinhwa2-signMember
master
C:\Users\user1\hanbatang>git add .
C:\Users\user1\hanbatang>git commit -m"restartjinhwa2"
[jinhwa2-signMember 9e1d9e1] restartjinhwa2
19 files changed, 0 insertions(+), 0 deletions(-)
C:\Users\user1\hanbatang>git push
fatal: The current branch jinhwa2-signMember has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin jinhwa2-signMember
To have this happen automatically for branches without a tracking
upstream, see 'push.autoSetupRemote' in 'git help config'.
C:\Users\user1\hanbatang>git add .
C:\Users\user1\hanbatang>git commit -m"jinzzalast"
[jinhwa2-signMember 7b39297] jinzzalast
8 files changed, 7 insertions(+), 12 deletions(-)
rename hanbatang/src/main/resources/static/css/{styles.css => memberstyles.css} (96%)
rename hanbatang/src/main/resources/templates/{member-register.html => memberSign.html} (99%)
C:\Users\user1\hanbatang>git push
Enumerating objects: 50, done.
Counting objects: 100% (50/50), done.
Delta compression using up to 6 threads
Compressing objects: 100% (22/22), done.
Writing objects: 100% (27/27), 5.02 KiB | 1.67 MiB/s, done.
Total 27 (delta 12), reused 3 (delta 0), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (12/12), completed with 12 local objects.
To https://github.com/jaewon0123/hanbatang.git
9e1d9e1..7b39297 jinhwa2-signMember -> jinhwa2-signMember
C:\Users\user1\hanbatang>git checkout master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.
C:\Users\user1\hanbatang>git merge jinhwa2-signMember
Updating f67c053..7b39297
Fast-forward
.../com/hanbatang/controller/MemberController.java | 4 ++--
hanbatang/src/main/resources/application.properties | 2 +-
.../static/css/{styles.css => memberstyles.css} | 2 +-
hanbatang/src/main/resources/templates/mainPage.html | 2 +-
.../main/resources/templates/mappers/MemberMapper.xml | 6 ------
.../{member-register.html => memberSign.html} | 2 +-
hanbatang/src/main/resources/templates/success.html | 1 +
.../com/hanbatang/controller/BoardController.class | Bin 1217 -> 1217 bytes
.../com/hanbatang/controller/LoginController.class | Bin 4862 -> 4874 bytes
.../com/hanbatang/controller/MailController.class | Bin 1454 -> 1454 bytes
.../com/hanbatang/controller/MainController.class | Bin 1101 -> 1101 bytes
.../com/hanbatang/controller/MainPageController.class | Bin 701 -> 701 bytes
.../com/hanbatang/controller/MemberController.class | Bin 1573 -> 1563 bytes
.../hanbatang/controller/ReadBoardController.class | Bin 1317 -> 1317 bytes
.../hanbatang/controller/UploadBoardController.class | Bin 2337 -> 2337 bytes
.../target/classes/com/hanbatang/dto/Board.class | Bin 2933 -> 2933 bytes
.../target/classes/com/hanbatang/dto/Member.class | Bin 2675 -> 2675 bytes
.../target/classes/com/hanbatang/dto/Members.class | Bin 3889 -> 3889 bytes
.../classes/com/hanbatang/mapper/BoardMapper.class | Bin 514 -> 514 bytes
.../classes/com/hanbatang/mapper/LoginMapper.class | Bin 722 -> 722 bytes
.../classes/com/hanbatang/mapper/MemberMapper.class | Bin 301 -> 301 bytes
.../classes/com/hanbatang/service/BoardService.class | Bin 1558 -> 1558 bytes
.../classes/com/hanbatang/service/EmailService.class | Bin 2828 -> 2832 bytes
.../classes/com/hanbatang/service/LoginService.class | Bin 1307 -> 1307 bytes
.../classes/com/hanbatang/service/MemberService.class | Bin 778 -> 778 bytes
.../target/classes/com/hanbatang/vo/MailVo.class | Bin 2609 -> 2609 bytes
26 files changed, 7 insertions(+), 12 deletions(-)
rename hanbatang/src/main/resources/static/css/{styles.css => memberstyles.css} (96%)
rename hanbatang/src/main/resources/templates/{member-register.html => memberSign.html} (99%)
C:\Users\user1\hanbatang>git add .
C:\Users\user1\hanbatang>git commit -m"membername change"
On branch master
Your branch is ahead of 'origin/master' by 2 commits.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
C:\Users\user1\hanbatang>git push
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
To https://github.com/jaewon0123/hanbatang.git
f67c053..7b39297 master -> master
C:\Users\user1\hanbatang>git checkout jinhwa2-signMember
Switched to branch 'jinhwa2-signMember'
Your branch is up to date with 'origin/jinhwa2-signMember'.
C:\Users\user1\hanbatang>
★ 또한 내가 헷갈렸던 지점은 이클립스 전산에서 브랜치에서 마스터로 변경하는것과 마스터에서 브랜치로 변경하는게
cmd창에서 이뤄지는게 아니라 이클립스 전산 메뉴에서 클릭해서 전환되는 걸로 알고 있었던 것이다.
따라서 브랜치->마스터 호환은 cmd창에서 체크아웃 명령어를 통해 이뤄지는 것을 알았다!!
'스프링부트' 카테고리의 다른 글
[스프링부트]build.gradle , Failed to configure a DataSource오류 (0) | 2024.08.26 |
---|---|
스프링부트 흐름 과 이해 그리고 중복확인에러 (0) | 2024.07.09 |
깃명령어와 React 시작! (0) | 2024.07.03 |
타임리프 실행 오류 (0) | 2024.06.26 |