'git'에 해당되는 글 4건

  1. 2023.09.22 repo mirror 만들기
  2. 2022.05.19 ubuntu 22.04 업데이트 후 git "sign_and_send_pubkey: no mutual signature supported" 에러 발생시
  3. 2021.12.10 git 임시로 committer, author 바꿔 commit 하기
  4. 2021.12.01 git 삭제된 파일 히스토리 보기

repo mirror 만들기

OS/linux 2023. 9. 22. 11:40
반응형

mkdir mirror
cd mirror
repo init -u REPO_ADDR -b BRANCH --mirror
repo sync -c

 

mirror 참조
repo init -u REPO_ADDR -b BRANCH --reference=MIRROR_DIR

반응형
:

ubuntu 22.04 업데이트 후 git "sign_and_send_pubkey: no mutual signature supported" 에러 발생시

OS/linux 2022. 5. 19. 22:20
반응형

 

git pull
sign_and_send_pubkey: no mutual signature supported

 

~/.ssh/config 파일에 "PubkeyAcceptedKeyTypes +ssh-rsa" 추가

host test.test.com
 HostName test.test.com
 IdentityFile ~/.ssh/id_rsa_git
 PubkeyAcceptedKeyTypes +ssh-rsa
 User git
반응형
:

git 임시로 committer, author 바꿔 commit 하기

OS/linux 2021. 12. 10. 22:42
반응형

환경 변수에 committer 와 author 를 설정 하면 git 명령 실행시 참조 하게됨

commit.sh

#!/bin/sh

NEW_NAME="testtest"
NEW_EMAIL="testtest@testmail.com"
export GIT_COMMITTER_NAME="$NEW_NAME"
export GIT_COMMITTER_EMAIL="$NEW_EMAIL"
export GIT_AUTHOR_NAME="$NEW_NAME"
export GIT_AUTHOR_EMAIL="$NEW_EMAIL"

git commit

기존 commit 에서 특정 이름 변경 하기(git push --force 가 가능해야함)

changeCommit.sh

#!/bin/sh

git filter-branch --env-filter '
OLD_EMAIL="oldold@old.com"
NEW_NAME="newnew"
NEW_EMAIL="newnew@new.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
    export GIT_COMMITTER_NAME="$NEW_NAME"
    export GIT_COMMITTER_EMAIL="$NEW_EMAIL"
fi
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]
then
    export GIT_AUTHOR_NAME="$NEW_NAME"
    export GIT_AUTHOR_EMAIL="$NEW_EMAIL"
fi
' --tag-name-filter cat -- --branches --tags

# push modification
# git push --force --tags origin HEAD:main
반응형
:

git 삭제된 파일 히스토리 보기

OS/linux 2021. 12. 1. 18:59
반응형
$ git log --all --full-history -- <path-to-file>
반응형
: