프로그램셋업 & 명령어/git & github

프로그램셋업 & 명령어/git & github

local git , remote git 연결하기

1. 일반적인 방법 - lisence 제외 github repository 생성 - 라이센스는 넣지 말기 terminal에서 해당 remote git에 push하고 싶은 프로젝트 폴더 경로로 이동 local git 생성 $ git init 해당 local git에 원격(remote git) 경로 연결 $ git remote add origin # url은 github repository의 code 부분을 클릭시 보여줌 원래 하던 반복 작업 add-commit-push 수행 참고. 현재 remote repository는 아무 commit도 존재하지 않아서 branch 조차 없는 상태이다. 따라서 현재 local의 branch 명으로 $git push origin [브랜치명] 하면 해당 브랜치명이 곧 def..

프로그램셋업 & 명령어/git & github

github page 만들기

사전 조건 local git과 remote git이 서로 연결되었음을 가정하고 수행 주의 html, css, js 와 같은 정적인 page에서만 수행가능 git hub에서 제공해주는 무료 호스팅 기능으로 branch 명이 무조건 gh-pages여야함 해당 branch를 remote에 push 할 시, 자동으로 hosting 수행 iterm2 터미널 환경 $ git branch gh-pages $ git switch gh-pages $ git push origin gh-pages

프로그램셋업 & 명령어/git & github

git 용어

head :현재 보고있는거 master : 이동하기 reset : 다 뒤로 checkout : detached - branch 이동안하고 head만 이동 git branch dev tag : 고저어 git config --global --list git init : 현재 dir에 local repo(git)가 생성 mkdir : 디렉토리 생성 git add git commit -m "" git log git log --oneline untracked tracked git restore --staged : staged area에서 제거 git rm --cached file명 git reset 파일명 git reset 모든 폴더와 파일ㅇ르 staging area에서 삭제 git clean -f 잠깐 뒤로 간..

프로그램셋업 & 명령어/git & github

협업 방법 - 모아두기 + 추가적으로 아는

요약 - 2가지 1. fork 2. collaborate - (우리 채택) 방식 팀장 ; 팀장이 main 관리, merge 요청 확인 해주기 팀원 : 팀장한테 pull request 요청 보내기 상대 팀원들이 pull request 수락 받으면 다른 인원들도 pull이라는 것을 통해서 update 필요 - conflict 막는 최선의 방법 단계: commit - push - pull request - code review - merge - 다 함께 pull - 개인 branch에 merge 수행 https://docs.github.com/ko/desktop/contributing-and-collaborating-using-github-desktop GitHub Desktop을 사용하여 기여 및 협업 - ..

프로그램셋업 & 명령어/git & github

git 협업 ezmeal

1. local에서 이미 만들어진 프로젝트 template 생성 2. git init 3. git add remote branch : git push -u origin dev(local 명) : dev (orign 명) 3. remote branch -> local branch : git fetch origin dev -> git merge origin/dev -> git checkout -b dev origin/dev git master와 dev 병합 - dev가 commit 적을 경우 1. commit 위치가 낮은 쪽으로 git checkout dev 2. git merge master 3. git push origin dev 주의 로컬 브랜치에서 직접 원격 저장소의 다른 브랜치로 push는 불가하다..

프로그램셋업 & 명령어/git & github

git bitbucket

local - git - github || bitbucket || gitlabs git이 remote해주는 역할인데 이런 역할을 하는 것이 git 뿐만이아니라 mercurial, svn 등이 존재한다. remote : local과 repository site를 연결해주는 다리 / git, mercurial, svn 등등 존재 git remote -v : origin (=github의미 ) git remote add 내가_정한_이름 ' 연결할 repository 주소 ' -> 이렇게하면 remote -v에 origin 뿐만 아니라 연결한 다른 repository 도 존재하게 된다. git remote remove 내가_정한_이름 으로 repository 연결을 삭제도 가능하다.

프로그램셋업 & 명령어/git & github

git CLI

작동 순서 change -> staged chagne -> commit -> push change: 변화된 모든 file을 읽는다. staged change : change된 file 중 같이 commit 할 file들을 group해 놓은 것. 다시 change로 roll back이 가능하다. ps. staged change가 된 a.txt 파일이 존재하고, commit 하지 않은 상태에서 a.txt file을 수정시 staged 와 change 영역 2곳에 동일 파일이 나타나게 된다. 물론 change file 영역에서 staged 영역으로 옮기면 합쳐진다. git log commit 이력을 볼 수 있다. head -> master : 내 컴퓨터에 commit 된 것 origin/master : git..

프로그램셋업 & 명령어/git & github

Git 협업 _ github

1. fork 1.1. 흐름 owner가 project 생성 coworker가 github site에서 fork 수행 coworker가 작업 수행 후, 자신의 git에 .add -> commit -> push까지 한 후, pull request 수행 owner는 pull request 확인 후 issue를 남기거나 merge 수행 원격 저장소에서 변경이 일어났으므로 fork github의 기능 복사본을 가진다. 그래서 실제 소스코드의 내용이 변경 될 시, fork를 update할 필요가 있다. 단계 fork 후 clone 하기 내가 local에서 수정 parent source code에 변경 수락 요청하기 : 내가 수정한거 가져 가죠!! - pull 방법 : 내 git-hub repository에 가서 ..

wooweee
'프로그램셋업 & 명령어/git & github' 카테고리의 글 목록