push error

뭐지...? push가 안되네???

push error

remote

local

commit a

commit a

create README.md

commit a + README.md

commit b

push

push

Error

push error

remote

local

commit a

commit a

create README.md

commit a + README.md

commit b

push

push

pull

commit a + README.md

commit b

$ git pull

$ git pull origin master

local 에 반영되지 않은 remote 데이터를

local 에 가져오고 자동으로 merge 까지

$ git fetch

$ git fetch origin

local 에는 없지만 remote 에는 있는 데이터를 가져옴

숨겨진 branch 가 생성

FETCH_HEAD

[읽기 전용 branch 로 가져옴]

remote 가 local 보다 앞서있는 경우

fetch vs pull

두 명령어 모두 remote 에만 존재하는 데이터를

local 에 '동기화' 해주는 의미

하지만 local 로 임시 가져온 데이터를

'자동으로' merge 해주는가? 의 차이

이제 'README.md ' 를 local 에서 만들고

remote 에 push 하자!

복습 한번 더

$ cd, ls, vi, :wq

$ git init

$ git add <filename>

$ git commit -m "커밋 내용"

$ git remote add origin [URL]

$ git push origin master

이것도 복습

$ git branch

$ git branch <branch_name>

$ git checkout <branch_name>

$ git log

$ git merge <base_branch_name>

conflict

1. likelion2 directory 생성

2. second.md 생성

3. second.md 내용 입력

4. likelion2 directory // $ git init

5. add, commit [master branch]

6. prac branch 생성, checkout

7. second.md 내용 수정

8. add, commit [prac branch]

9. master branch 로 checkout

10. second.md 내용 수정하기

여기까지 하고 대기해주세요 :)

Live Coding

수고하셨습니다 :)

LIKELION_#12_2

By LEEJUN

LIKELION_#12_2

  • 128