본문 바로가기

기타/Linux

[GIT] git log 포함하여 remote 에 강제로 push 하기

728x90
반응형

git history log 포함해서 강제로 push 하기

All branch 를 포함한 전체 push

  1. bare 와 mirror 옵션으로 git 을 복제한다.
  2. 복제된 git 에 새로운 URL 를 추가한다.
  3. 새로운 URL 에 강제 push 한다. (모든 branch 를 push 하기 위해 --all 옵션 추가)
git clone <URL_GIT> --bare --mirror
git remote add new <URL_TO_PUSH>
git push new —all

특정 branch 만 push

  1. bare 와 mirror 옵션으로 git 을 복제한다.
  2. 복제된 git 에 새로운 URL 를 추가한다.
  3. 새로운 URL 에 강제 push 한다. 
git clone <URL_GIT> -b devel
git remote add new <URL_TO_PUSH>
git push new devel

관련자료

https://git-scm.com/docs/git-push

 

Git - git-push Documentation

In general, URLs contain information about the transport protocol, the address of the remote server, and the path to the repository. Depending on the transport protocol, some of this information may be absent. Git supports ssh, git, http, and https protoco

git-scm.com

 

반응형