본문 바로가기

git

On branch master nothing to commit, working tree clean

728x90

위의 에러를 볼 경우 당황스럽다. 어떻게 해결해야 될까 ?

 결론부터 이야기 하자면 커밋 이후에는 당연히 워킹 트리(staging area)는 깨끗하다 라는 의미이다. 

그리고 아래는 커밋을 했기 때문에 push만 하면된다! 그래서 깔끔하게 해결! 

waring: LF will be replaced~ 은 말 그대로 경고이다. 그래서 변경된 파일은 실제 staging area로 이동했다.  git config --global core.autocrlf true로 경고가 사라진다. 

git add .
git status
warning: in the working copy of 'src/member/member.controller.ts', LF will be replaced byext time Git touches it
warning: in the working copy of 'src/member/member.service.ts', LF will be replaced by CR time Git touches it
PS C:\Users\사용자\Desktop\Nest_JS\Dev_Backend> git config --global core.autocrlf true
PS C:\Users\사용자\Desktop\Nest_JS\Dev_Backend> git commit -m "12.23 SESSION"
[master 31d463a] 12.23 SESSION
PS C:\Users\사용자\Desktop\Nest_JS\Dev_Backend> git status
--------------------- 여기서 부터 의문을 가짐 -------------------------
On branch master
nothing to commit, working tree clean

 

기본 지식 알고가기 

깃 레포지토리는 Local repository 와 Remote repository를 의미한다.

 

 

 

728x90