git Bash 실행
git config --global user.name "유저이름"
git config --global user.email "이메일"
git clone {깃주소}
git init
git add .
git commit -m "first commit"
git remote add origin {깃주소}
git push origin master
git branch {브랜치명}
git checkout {브랜치명}
git add .
git commit -m "first commit"
git push origin {브랜치명}
깃에서 클론을 해와서 브랜치를 생성하는 과정에서
fatal: Not a valid object name: 'master'.
오류가 발생했다.
해결: master에서 커밋을 한 번도 하지 않아서 발생한 오류로 커밋을 해주거나...
git remote add origin {깃주소}
를 작성하니 됐다.
nothing to commit, working tree clean
이 오류는 브랜치를 잘못 설정해주어서 발생한 오류이다.
브랜치를 만들어준 뒤에, checkout 명령어를 통해 해당 브랜치로 이동해주고 커밋을 하면 된다.
댓글