본문 바로가기
728x90
반응형

git10

[Git] webhooks 을 이용한 auto git pulling 구성 (git pull with webhooks) git webhooks을 이용하여 remote storage에 있는 source를 업데이트 할 수 있는 환경을 만든다. webhook receiver는 아래 문서를 참고하여 작성한다. Webhooks | GitLab Documentation for GitLab Community Edition, GitLab Enterprise Edition, Omnibus GitLab, and GitLab Runner. docs.gitlab.com 리모트 환경에 Git clone git pull 이 자동으로 필요한 remote 환경에서 git source clone $ git clone https://gitlab.test.net/test.git webhook receiver 작성 webhook_receiver.rb req.. 2023. 2. 13.
[git] git branch 이름 변경 git 작업을 하다보면 git branch 이름 변경이 필요한 경우가 있다. 그럴경우 아래와 같은 방법으로 git branch 명을 변경 할 수 있다. Local Branch 이름 변경 방법 -m 옵션을 통해 Local Branch의 이름을 변경 할 수 있다. $ git branch -m {new_branch_name} Remote Branch 이름 변경 방법 변경된 Local Branch를 Remote에 push해서 변경한다. $ git push origin -u {new_branch_name} 이후 이전 브랜치를 delete 한다. $git push origin --delete {old_branch_name} 2022. 5. 20.
[Git] git stash (git 임시 저장) git stash git stash는 현재 진행중인 작업들을 commit 하지 않고 임시 저장 후 나중에 불러와서 다시 작업을 진행할 수 있도록 도와주는 명령어이다. stash 임시 저장 git stash 명령어를 사용하여 stash에 저장되고 이때 작성중인 working directory는 이전상태로 돌아간다. $ git stash $ git stash save stash 저장 목록 확인 $ git stash list stash@{0}: WIP on refactor-code: fdc47a753 refactor code stash 저장 가져오기 # 최근 stash 가져오기 $ git stash apply # 특정 stash 가져오기 $ git stash apply stash@{0} stash 제거 # 최.. 2022. 5. 17.
[git] git push 되돌리기 - reset git commit을 잘못하여 되돌려야 할때가 있다. 이럴 경우 git reset 명령어를 사용해서 commit을 되돌릴 수 있다. commit 되돌리기 먼저 git log 를 통해 commit 내용을 살펴보자. $ git log commit fe954047297922fdc380b974ebe83a401504ed6c (HEAD -> main, origin/main) Author: test Date: Thu Nov 25 19:17:39 2021 +0900 third commit commit 388ac6c6d77cad44065b51f1f5e2cd461660ebc8 Author: test Date: Thu Nov 25 19:16:24 2021 +0900 second commit commit 070310e37ee.. 2021. 11. 25.
728x90
반응형