git
-
[git] 커밋 메시지에 preifx 붙이기는 git hookDev 2025. 4. 7. 01:22
커밋 메시지에 자동으로 prefix를 붙이는 git hook을 만들어보겠습니다.# 0. git hook 만들기 처음 git hook을 만든다면 기본적으로 아래 3가지 단계를 거쳐야 합니다..git/hooks/ 경로에 파일 생성실행 권한 부여원하는 프리픽스를 넣는 스크립트 작성 실행 권한 부여는 아래 커멘드를 입력합니다. 만약 스크립트 파일 이름을 prepare-commit-msg 라고 지었다고 가정하면 아래 커멘드를 입력하면 됩니다.chmod +x .git/hooks/prepare-commit-msg # 1. 기본 > git hook으로 프리픽스 붙이기"[LOGIN]" 프리픽스를 자동으로 붙이는 git hook을 만들어 보겠습니다.#!/bin/shPREFIX="[LOGIN]"# 커밋 메시지 파일 경로는 ..
-
[git] revert 할 수 없을 때, commit revert is a merge but no -m option was given.Dev 2022. 8. 29. 00:42
커밋을 revert 시킬 때 아래 명령어를 사용할 수 있습니다.git revert {commit hash} 하지만 브랜치가 여러 개 있을 경우, 아래 에러 메시지가 나오며 불가능할 때가 있습니다.commit { } is a merge but no -m option was given.merge 한 커밋을 revert 하려고 하는데, 누구를 revert 할지가 애매해서 하기 때문에 -m(merge) 사용해 옵션을 어떤 머지를 revert 할 지 명확하게 지정해달라는 의미입니다. 아래 과정으로 처리해줄 수 있습니다. git cat-file -p {hash} 로 tree 확인가능tree 의 두 부모 중 하나를 정해줘야함.m1 면 머지된 treem2 면 머지시킨 treegit revert {commit has..
-
Xcode 여러 버전 설치 후 git 문제iOS 2022. 5. 13. 14:16
아래와 같은 에러가 나온다면, git에서 제대로 된 Xcode 경로를 찾지못해 발생하는 에러입니다. xcrun: error: active developer path ("/Users/~~~/Xcode13.2.app/Contents/Developer") does not exist Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools. See `man xcode-select` for m..