일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- ChIPseq
- MACS2
- 비타민 C
- EdgeR
- Bioinformatics
- julia
- PYTHON
- CUTandRUN
- ngs
- scRNAseq
- drug development
- js
- Git
- cellranger
- HTML
- single cell analysis
- github
- matplotlib
- 싱글셀 분석
- CSS
- drug muggers
- single cell
- pandas
- CUT&RUN
- DataFrame
- javascript
- single cell rnaseq
- Batch effect
- scRNAseq analysis
- python matplotlib
- Today
- Total
바이오 대표
[Github] Remote repository 이용 (pull, push, fetch, clone, remote, merge) 본문
[Github] Remote repository 이용 (pull, push, fetch, clone, remote, merge)
바이오 대표 2022. 1. 9. 17:27
git remote | Lists remote repos remote 저장소 리스트 |
git remote -v | List remote repos verbosely remote 저장소 좀 더 자세하게 |
git remote show <name> | Describes a single remote repo remote 저장소 한개 설명 |
git remote update | Fetches the most up-to-date objects 최신버전 fetch |
git fetch | Downloads specific objects 특정부분 fetch |
git branch -r | Lists remote branches git 이 현재 tracking 하는 remote branch |
Github을 Remote repository 로 이용을 할 때:
- Pull (내 컴터로 가져오기 및 병합)
- Modify (수정 및 stage, commit)
- Merge (수정 내용 합치기)
- Push (다시 Remote Respotisitory 로 내보내기)

사용 예시:
< Working with Remotes >
$ git clone
$ git remote -v

$ git remote show origin
--> fetch, push, local, remote branch 를 보여준다

$ git branch -r
--> Git repo 가 currently tracking 하는 branch

$ git status
-> 최신 our branch 와 origin/master branch 를 보여준다 (여기서 master branch in the remote repository == origin )

< Fetching New changes >
$ git remote show origin
--> remote branch 의 자세한 정보 파악
* 만약 "Master pushes to master (local out of date)" 라 적혀있으면 updated 가 아직 locally 반영 되지 않은 것이다.
$ git fetch
: copies commits done in the remote repository to the remote branches ( can see what other people committed )
--> $ git checkout ( to see the working tree),
--> $ git log ( to see the commit history)
* review the changes that happen in the remote repository / 확인 후에 git merge: integrated them into the local branch
$ git merge origin/master
: 수정사항이 로컬 branch 와 병합
* git fetch vs git pull
- git pull 은 다운 및 병합
- git Fecth는 다운만
$ git pull = $ git fetch + $ git merge origin/master
< Updating the Local Repository>
$ git pull
--> 자동으로 merge with local = fetch, merge 를 한번에

$ git remote show origin
: remote branch 의 자세한 정보 파악
$ git checkout [newbranch name]
: local 에 새로운 branch 형성
* new branch 는 remote 에 존재하는 것도 checkout 을 함으로 automatically copy the contents of the remote branch into the local branch
$ git remote update
: fetch the contests of all remote branches and allow us to merge the contents ourselves.
* 만약 Master Repository 가 업데이트 되면 Git 이 너한테 알려줄 것이다.
reference: Coursera "Introduction to Git and Github"
'Programming enviorment' 카테고리의 다른 글
[ Jupyter Lab ] 단축키 (for mac) (0) | 2022.01.12 |
---|---|
[Github] 전체적인 process 예시 (0) | 2022.01.09 |
[Github] Branch ( git branch, -d, merge ) (0) | 2022.01.08 |
[Github] Github (Pull 가져오기 & Push 보내기) (0) | 2022.01.07 |
[Git] 작업취소 - git [checkout/reset/commit --amend] (0) | 2021.12.05 |