git clone을 하면 git history까지 다 내려 받고 git remote가 연결되고 git branch가 잡힌다.

degit을 쓰면 단순히 repository 폴더만 가져 올 수 있다.

npm install -g degit```

```shell
degit user/repo```

사용법도 git보다 간단하다.

'개발환경 설정' 카테고리의 다른 글

nvm 프로젝트별 설정  (0) 2022.05.15
VSCODE] typescript debugging configuration  (0) 2020.03.23
vs-code] webpack alias link  (0) 2020.01.01
nginx] proxy_pass 적용 안되는 경우  (0) 2019.11.12
git hub 암호 캐싱하기  (0) 2019.01.27

git config user.name 과 user.email 설정이 잘못되었을 경우 contribution에 표시가 안된다.

1. bare로 clone

git clone --bare https://github.com/user/repo.git cd repo.git

2. branch filtering
your-old-email@example.com을 이전 이메일
Your Correct Name는 바뀐 name
your-correct-email@example.com는 바뀐 이메일

git filter-branch --env-filter '

OLD_EMAIL="your-old-email@example.com"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="your-correct-email@example.com"

if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
fi
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_AUTHOR_NAME="$CORRECT_NAME"
export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
fi
' --tag-name-filter cat -- --branches --tags

3. repository 덮어쓰기

git push --force --tags origin 'refs/heads/\*'

아래 사이트를 참고해서 수정 가능하다.
https://help.github.com/en/github/using-git/changing-author-info

'개발환경 설정 > Git' 카테고리의 다른 글

git terminal 계정변환시 재인증 안될 경우  (0) 2021.02.08
Get Started With Git CLI  (0) 2019.05.19

쿠키에 세션 정보를 담아 놓고 로그인 유지를 판단하는데

origin이 다르면 chrome은 이제 default 상태에서 쿠키를 저장하지 않는다.

요즘은 client와 server url이 다른 경우가 많다.

서버에서 쿠키 설정에 SameSite: 'none'으로 지정해 주어야

cross site에서 쿠키를 저장할 수 있다.

'nodeJS > http transaction' 카테고리의 다른 글

Chrome CORS Policy: Access-Control-Allow-Origin  (0) 2020.02.19
nodeJs http file transfer  (0) 2019.04.25

+ Recent posts