본문 바로가기

git/github

[Git] git merge - fast forward, 3-way-merge 최근 회사에서 git을 사용하게 되면서 progit책을 구입하여 다시 git을 공부하고 있습니다.github을 통해서 개인적으로는 git을 계속 써오긴했으나 사용하는 명령어가 clone, push, fetch, pull, commit등 주로 혼자 사용하게 되는 명령어로 한정이 되어있던데다가... 지금 회사처럼 많은 개발자가 동시에 사용해본 경험도 없어서 아무래도 한계가 금방 다가오더군요... progit책에 대한 리뷰는 곧 쓸 예정이긴한데요.. 내용중 merge에 대한 내용을 직접 실습해보면서정리를 할겸 블로그에 포스트를 남겨봅니다. merge는 크게 fast-forward와 3-way merge로 나뉘어집니다. 저는 처음에 git에서의 merge가 각 파일의 수정사항을 하나하나 비교하면서 직접 파일의 .. 더보기
[Git] remote repository에 Merge branch 'master' of 가 생기는 이유 http://stackoverflow.com/questions/7120199/github-merge-branch-master remote repository에 push를 할 때 커밋 히스토리에Merge branch 'master' of http://.... 가 생기는 경우에 대한 내용. 요약하면.. A와 B가 동일 commit 히스토리를 유지한 상태에서.. A가 commit - push를 하고 B가 remote repository sync없이 다른 작업을 commit - push하는 경우 reject가 나고.. 이때 pull을 받는 과정에서 remote의 commit이 merge가 되는데 이에 대한 commit history임.. 더보기
[Git] 좋은 참고 사이트 http://gitref.org/inspect/ 주요 명령어가 예제와 같이 나와있어서 참고하기가 좋음. pro-git 번역 사이트http://git-scm.com/book/ko github repository를 이용해 많은 언어로 번역 작업이 진행되고 있는 중.. 그 repository를 web으로 연결하여위와 같이 보여주고 있는듯. 더보기
[Git] remote branch , tag 삭제 git push head:/{branch_name}git push tags:/{branch_name} 더보기
[Git] stash 사용 예 stash 명령어는 워킹 디렉토리에서 수정한 파일들만 저장이 된다. 수정내용을 잠시 스택에 저장해둔다고 생각하면 간단하다. git repository에서 이미 커밋되어있던 3개의 파일을 수정하여 작업을 하고있다. 1. vi a.txt2. vi b.txt3. vi c.txt a.txt는 스테이지모드로 변경 4. git add a.txt git status 확인$ git status# On branch master## Initial commit## Changes to be committed:# (use "git rm --cached ..." to unstage)## new file: a.txt## Untracked files:# (use "git add ..." to include in what will b.. 더보기
[github] 원하는 commit만 pull request 보내기 http://stackoverflow.com/questions/5256021/send-a-pull-request-on-github-for-only-latest-commithttp://kurogo.org/guide/github.html git checkout -b upstream upstream/master git cherry-pick sha1 git push origin upstream 원본 repository를 브랜치로 따고..cherry-pick으로원하는 커밋만 merge 후그걸 push해서 pull request로 보내는 개념인듯하다.. ---- 위 내용대로 해보니 잘 안되는 부분도 있고... 설명이 부족한듯 해서...step by step으로 직접 해보면서 정리.. ---- 실제 후배의 repos.. 더보기
[Git] git에 대한 좋은 설명 http://www.slideshare.net/dhrim/git-12030742?fb_action_ids=435888533133034%2C435599853161902&fb_action_types=slideshare%3Aview&fb_source=other_multiline&action_object_map=%7B%22435888533133034%22%3A398757386545%2C%22435599853161902%22%3A10150683464818815%7D&action_type_map=%7B%22435888533133034%22%3A%22slideshare%3Aview%22%2C%22435599853161902%22%3A%22slideshare%3Aview%22%7D&action_ref_map=%5B%5.. 더보기
[github] gist 기능으로 소스코드 post 하기 테스트 테스트하기..항상 별도의 스크립트 태그를 사용했는데gist를 사용하면 굉장히 쉽고 편리하게 소스코드를 블로그에 붙일 수 있네요. 참고 : http://koesnoom.tistory.com/86 gist라니.. 다른곳에도 유용하게 사용될 수 있는 기능인 것 같습니다. 왠지 gist에서 소스 수정하면 그 수정된 소스가 자동으로여기에도 반영될듯... 더보기
[git] 삭제한 파일들 다수를 commit 하는 방법 http://stackoverflow.com/questions/1856654/git-how-to-add-commit-removals-made-via-vanilla-rm Without spaces in filenames:$ git rm `git ls-files -d` More robust:$ git ls-files -z -d | xargs -0 git rm 더보기
[github/링크] github syncing forked repository with master repository http://chriscase.cc/2011/02/syncing-a-forked-git-repository-with-a-master-repositorys-changes/ https://help.github.com/articles/syncing-a-fork 더보기