본문 바로가기
DL

[Git repo] from "git clone" to "merge"

by YGSEO 2021. 1. 31.
728x90

IF not invited to the repo, Fork repo, then dev.

If invited, clone it and do it.

 

- make branch by clicking git button (branch: albu)

- doing dev ldf0234130941asdfahk!$)!@#@

 

- "git status": to check changes in several files.

- "git add Sleep/main.py": to stage for commit ( one file at a time )

- "git commit -m 'I changed this just for fun' " ( one file at a time )

- "git remote -v": to check at which origin I'am

- "git push origin albu" : push albu branch to origin repo

- go to git and click branches

- then there is a button for pull request highlighted with green syntax.

- after clicking pull request, then you will see ,if you are a contributor(?), this merge pull request button.

- After merged

Last, pull repo from master branch

- "git pull origin master"

 


디버깅하려고 다른 데이터셋으로 돌리고 자잘한 bug fix한 후 git status 찍어보니

pycache라는 폴더가 생성되었다.

구글링해보니, 파이썬 파일을 실행시키면 만들어지는 cache파일.

다음에 재실행시 더 빠르게 실행할 수 있도록 생성된다고 함.

하지만 git에는 업로드할 필요가 없는 파일들이기 때문에 어떻게 처리해야할지 당황하다가.

 

.gitignore 파일을 만들어서 (.파일은 숨김파일) 안에 무시하는 file이나 폴더를 넣어주면 된다.


파일을 수정하다보면 어떤 파일을 수정했는지 모르는 경우

git diff 를 입력하면 수정내용을 확인가능하다.

728x90

댓글