혼자 고민해보기_ 개발/TIL (Today I Learned)

20230629(목)_ 노드 JS 뉴스피드 팀 프로젝트 진행

nuri-story 2023. 6. 29. 21:42

금일 달성 항목

1)  노드 JS 뉴스피드 팀 프로젝트 진행 : 마이페이지, 프로필 수정 css 작업


문제 해결 과정 1-  git pull 오류

[문제]
git pull을 하게되면 자꾸만 

hyerim@hyerimui-MacBookAir News-Feed-Project % git pull origin master
From github.com:cooderyg/News-Feed-Project
 * branch            master     -> FETCH_HEAD
hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint: 
hint:   git config pull.rebase false  # merge
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
hint: 
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.

이러한 오류가 떴습니다.

[시도]

git add . 와

git commit -m "수정사항" 을 하니

 

On branch rim_mypage
nothing to commit, working tree clean

으로 되어있었습니다.

이미 마스터 계정에 풀로땡겨와서 그런가 했습니다. 

 

git fetch, git pull, git log, git branch, git reset 등 이것저것 확인해보았습니다. 

 

hyerim@hyerimui-MacBookAir News-Feed-Project % git pull
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/<branch> rim_mypage

다시 위와같은 오류가 생겼는데 검색해보니

 

https://insapporo2016.tistory.com/53

 

git pull 가 안먹을때

시작하며 repository에서 clone으로 복사하면 폴더가 생성 되면서 파일들을 다운 받을수 있지만 가끔 폴더가 있어서 삭제 하기 좀 그런 상황이 있습니다. 삭제하고 clone으로 하면 간단하지만요 ^^; git

insapporo2016.tistory.com

이런 내용이 있었습니다.

 

[해결]

git branch --set-upstream-to=origin/rim_mypage rim_mypage

마스터계정과 제가 판 banch의 계정이 연결이 끊어져서 생긴 이슈였습니다.. 또내가 뭘 잘못한건지..하하

 

[알게된 점]

마스터와의 연결이 끊어지면 다시 연결시키면 되는 것을 깨달았습니다.