티스토리 뷰

git

git author 한번에 모두 바꾸기

thingsu 2021. 2. 4. 00:53

여러 계정을 사용하든, config에서 오타를 냈든, author나 committer 등 커밋 변수들을 잘못 쓰는 경우가 있는데,

안타깝게도 그것을 발견한 것은 한참 후라면?

  • filter-branch는 히스토리 전체에서 원하는 것만 가져올 수 있음
  • --env-filter는 커밋이 수행되는 환경에 필터를 걸 수 있음: author, committer, name, email, time 등의 환경변수들!
    참고
Cannot create a new backup.
A previous backup already exists in refs/original/
Force overwriting the backup with -f

위와 같은 에러가 뜰 때가 있는데 아래 명령어로 해결 가능

git update-ref -d refs/original/refs/heads/master

참고

'git' 카테고리의 다른 글

fatal: the remote end hung up unexpectedly 오류 해결  (5) 2021.05.23
config 수정하기  (0) 2020.11.28
author 바로잡기  (0) 2020.11.28
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday