{"componentChunkName":"component---src-templates-blog-post-js","path":"/git/git_flow/","result":{"data":{"site":{"siteMetadata":{"title":"Progress Not Perfection","author":"Sunmin","siteUrl":"https://sunmin.netlify.com","comment":{"disqusShortName":"","utterances":"Sunmin0520/blog"}}},"markdownRemark":{"id":"7cbf6d53-1d50-52ca-8e2a-40cd421e1a2e","excerpt":"master → develop → feature, hot fix, release master: master에 변경내역있다면 production에 배포되는 것  develop: hotfix 제외하고는 모든 변경내역은 develop에서 시작 feature: develop에서 생성하고, 기능 완성되면 develop에 merge release: develop에서 생성하고, master나 develop에 merge hotfix: master에서 생성하고, master와 develop에 merge…","html":"<p>\n<img src=\"https://user-images.githubusercontent.com/60782131/114875191-038f1d00-9e38-11eb-92fd-a559510cfd99.png\"></p>\n<ul>\n<li>master → develop → feature, hot fix, release</li>\n<li>master: master에 변경내역있다면 production에 배포되는 것 </li>\n<li>develop: hotfix 제외하고는 모든 변경내역은 develop에서 시작</li>\n<li>feature: develop에서 생성하고, 기능 완성되면 develop에 merge</li>\n<li>release: develop에서 생성하고, master나 develop에 merge</li>\n<li>hotfix: master에서 생성하고, master와 develop에 merge</li>\n</ul>\n<br/>\n<ul>\n<li>\n<p>순서\n<img src=\"https://user-images.githubusercontent.com/60782131/114877791-97fa7f00-9e3a-11eb-9366-417022df17e4.png\"></p>\n<ol>\n<li>로컬 저장소 생성</li>\n<li>README.md 생성(master에 무언가 push하고, master-devleop-feature로 가기 위해 이용)</li>\n<li>git init</li>\n<li>git add, commit</li>\n<li>git remote add origin &#x26; git push origin master</li>\n<li>git checkout -b develop → 작업</li>\n</ol>\n</li>\n</ul>\n<br/>\n<ul>\n<li>\n<p>feature에서 작업 중이고, develop에서 push되었고 feature에서 필요한데 pull하지 않은 코드가 있다면?</p>\n<ul>\n<li>stash → develop으로 이동 → git pull. 즉 <strong>feature에서 develop을 pull하지 않는다.</strong></li>\n</ul>\n</li>\n</ul>\n<br/>\n<ul>\n<li>\n<p>upstream, downstream, origin</p>\n<ul>\n<li>내가 어떤 레포를 pull하면 그 레포가 upstream, 내 레포가 downstream. 상대적</li>\n<li>한 레포(original repo)를 clone하면 default remote가 origin. 즉 <strong>내 레포가 origin</strong>.  original repo를 추적하려면 ‘git remote add upstream 주소’ 로  추가해야함 </li>\n</ul>\n</li>\n</ul>\n<br/>\n<ul>\n<li>\n<p>HEAD</p>\n<ul>\n<li>현재 작업중인 브랜치를 가리킴. master에서 작업 중이면 head는 master에 있고, feature에서 작업중이면 head는 feature에 있다.</li>\n<li>‘git reflog’로 확인 가능</li>\n</ul>\n</li>\n</ul>\n<br/>\n<br/>\n<p><strong>출처</strong></p>\n<ul>\n<li><a href=\"https://www.holaxprogramming.com/2018/11/01/git-commands/\">https://www.holaxprogramming.com/2018/11/01/git-commands/</a></li>\n</ul>\n</p>","frontmatter":{"title":"[git] git flow","date":"April 15, 2021"}}},"pageContext":{"slug":"/git/git_flow/","previous":{"fields":{"slug":"/nodejs/book1_01/"},"frontmatter":{"title":"[Node.js] [Node.js 교과서] 1. 노드 시작하기","category":"nodejs","draft":false}},"next":{"fields":{"slug":"/etc./codestates/"},"frontmatter":{"title":"[리뷰] 코드스테이츠의 취업 후 상환 제도를 이용하며","category":"etc.","draft":false}}}},"staticQueryHashes":["3128451518","521680639"]}