Git Bash Here 이용 커밋
초기설정
git config --global user.name "유저이름"
git config --global user.email "유저 이메일"
파일 준비
git init #.git 파일 생성
git add . #선택한 프로젝트 폴더 내의 모든 파일 관리
-> 특정파일만 하고 싶다면 git add 파일이름.파일형식 ex) git add a.txt
git status #상태확인
git commit -m "주석" #커밋
업로드하기
git remote add origin {위 3번에서 저장한 깃허브 저장소 주소}
git push -u origin main
아래건 깃랩 프로젝트 생성시, 초기 설정방법 안내
cd existing_repo
git remote add origin http://깃주소:포트/레포지토리/프로젝트.git
git branch -M main
* 아래 push 할 때 에러 발생시 git fetch 하고 푸쉬한다.
----- 해당 에러 내용 --------------
error: failed to push some refs to ' http://깃주소:포트/레포지토리/프로젝트.git'
-------------------------------------
git push -uf origin main
깃 저장소 레포지토리 옮기기 이동 (비트버킷 -> 깃)
git clone --mirror 비트버킷 깃 레포 주소
cd 해당경로.git
git remote set-url --push origin 깃랩 레포주소
git branch -M main
git push --mirror
브런치 삭제
git branch -d 해당브런치명
git push
git branch -a
git push 원격저장소이름(origin) -d 원격브런치명
참고
https://soda-dev.tistory.com/12
[GitHub] 깃허브에 프로젝트 올리기
보통은 저장소를 생성한뒤 'Upload files'를 하면 업로드되지만 파일 갯수가 너무 많을 경우 안되므로 큰 프로젝트를 업로드할때는 이 방법으로 하자 1. Git을 설치한다. https://git-scm.com/downloads Git - Do
soda-dev.tistory.com
https://lxxyeon.tistory.com/99
[Git] 저장소 repository 옮기기, 이동
git repository mirroring git 저장소(repository)를 커밋로그 포함, 그대로 옮기는 방법 [Solution] 1. 원본 저장소(A)를 복사(mirroring)한다. $ git clone --mirror [원본 저장소 경로] 2. 클론한 디렉토리 안으로 이동 $
lxxyeon.tistory.com
https://www.freecodecamp.org/korean/news/git-delete-local-or-remote-branch/
Git 로컬 및 원격 브랜치 삭제하기
Git은 많은 이들의 사랑을 받고 있는 버전 관리 시스템이자 웹 개발자의 필수 도구입니다. 브랜치(branch)는 Git이 제공하는 강력하고 중요한 기능 중 하나입니다. 이번 기사에서는 Git의 로컬 및 원
www.freecodecamp.org