☆Github 저장소를 로컬 git에서 별칭으로 만들어 관리하기
1. github 와 연결
$ git remote add origin(별칭) github's URL(내가 앞으로 올릴 repository URL)
2. Local git 에서 remote github로
$ git remote push origin(별칭) main(git hub default branch name)
※ 주의 Local과 remote의 데이터 상태가 동일하지 않을 경우 push가 불가능.
따라서 pull을 통해서 local === remote 데이터 상태를 동일화 시킨후 push 가능 url.
Basic concept
master(main) = local repository
orgin/master(main)[보통 최신 버전을 가리킴] = remote repository
pull = fetch(당겨온다, 읽어 온다) + merge
fetch 를 하면 가장 최신 업데이트 된 repository정보를 가져옴 from branch(없으면 안 가져오겠지염?)
github desktop에서 publish = push
'UI > git || github' 카테고리의 다른 글
[ git/clone ] git 클론 하기(특정 브런치 가져오기) (0) | 2024.05.27 |
---|---|
[git] a new branch (1) | 2024.05.27 |
[github branch] git bash로 git hub branch 만들기 (0) | 2024.02.06 |
[git] git (working Directory / Staging Area / Repository)작업하기 (0) | 2024.01.30 |
[Git] git과 github set 하기 (1) | 2024.01.29 |