오랜만에 개인 프로젝트를 시작했는데 쉬는 텀이 길다보니 매번 시작할때마다 git 관련 오류때문에 구글링하는 시간이 아까워 기록용으로 남깁니다.
소스 코드 작성하고 이런저런 테스트 해보고 github repo 생성후에 push 하려고 했는데
% git init
% git remote add origin {github url}
% git push --set-upstream origin main
Password for 'https://aaaaaa@github.com':
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/aaaaaa/test.git/'
이렇게 에러가 난다면 Password 란에 Personal Access Token(PAT) 값을 넣어주면 됨.
PAT 는 github계정설정 (repo 설정 아님) > Developer Settings > Personal access tokens (classic) 에서 발급받을 수 있음.
그리고 브랜치 이슈로 아래와 같은 에러가 발생한다면..
% git checkout main
branch 'main' set up to track 'origin/main'.
Switched to a new branch 'main'
% git merge prod
fatal: refusing to merge unrelated histories
% git merge prod --allow-unrelated-histories
이 명령어로 해결할 수 있음
brew update 오류 (couldn't find remote ref) (0) | 2024.07.03 |
---|---|
Spock Test Framework 실행 오류 해결 (2) | 2024.01.03 |
[IntelliJ] 신규 생성 프로젝트의 빌드 오류 (Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.2.1) (1) | 2024.01.03 |
SpringBoot 2.3 -> 2.5 업그레이드 후기 (0) | 2023.12.29 |
[AWS/SQS] cloudwatch datapoint 조회하기 (2) | 2022.12.29 |
사실 이걸 git 명령어로 확인할 일이 얼마나 있겠냐마는 다음에 혹시라도 또 쓸일이 있을까봐 기록용으로 남깁니다.
git shortlog -sne --since="01 Apr 2022" --before="01 May 2022" --no-merges
위 명령어를 이용하면 22년 4월 1일부터 22년 5월 1일 전까지, 즉, 4월 한달동안 merge 커밋을 제외한 실질적인 개발작업의 커밋건수를 확인할 수 있습니다.
결과는 아래와 같이 출력됩니다.
53 홍길동 <gildong.hong@company.com>
49 김철수 <cheolsoo.kim@company.com>
31 임꺽정 <kj.lim@company.com>
[AWS] EC2 에서 Elasticache(Redis 클러스터) 접속하기 (0) | 2022.05.26 |
---|---|
[AWS] SQS와 Lambda를 이용하여 DLQ 처리하기 (0) | 2022.05.19 |
AWS Elasticsearch ISM을 활용한 인덱스 자동삭제 (0) | 2021.04.21 |
SpringBoot 2 http response utf-8 설정하기 (0) | 2021.03.11 |
[5분 코딩] Spring4 + JCache (feat. Ehcache) (0) | 2020.12.17 |
Git에서 태그 삭제하기
git tag -d {name of tag}
git push origin :refs/tags/{name of tag}
git tag -d 12345
git push origin :refs/tags/12345
[C++] Heap Memory Allocation of Several Varibles 변수의 힙메모리 할당 (0) | 2019.02.15 |
---|---|
[MyBatis] 전달받은 객체에 값 세팅하기 (selectKey) (0) | 2018.02.03 |
[ Node.js in Action ] 13장 요약 (0) | 2017.06.03 |
[ Node.js in Action ] 3장 요약 (0) | 2017.06.03 |
[ Node.js In Action ] 1장 요약 (0) | 2017.06.03 |