[Git] branch / tag / readme

JONGYOON JEON·2024년 2월 17일
0

Git

목록 보기
5/5

Git branch ?

특정 버전에서 새로운 Branch를 만들어서 작업하다가 병합할 수 있다.

git branch
git branch -r  #
git branch --all
git branch <branch_name>
git push origin <branch_name>
git branch --delete <branch name> ## local 만 지워짐
git push origin --delete <branch name> ## remote 에서도 삭제
git checkout <branch_name>

git branch 생성 후 이동 한번에 하기

git checkout -b <branch name> git

git branch 삭제 후 remote 에서도 삭제

git branch --delete dev2
여기서 아무것도 안한 빈파일이라 문제가 생김. 강제로 지우기 실행
git brnach -D dev2
그리고 remote에서도 지워주기
git push origin --delete  dev2

merge

현재 버전에 다른 버전을 병합하는 자겁
Branch를 병합하거나
Push Pull 할때도 일어난다.

git merge dev

conflict

merge 하다가 발생하는 문제들
git 이 auto merge 해준다

========= 를 기준으로 충돌 부분을 보여줌

해결 과정

1. 파일수정

2. git add

3. git commit

강제 commit > git commit -i

바로 push 하지말고 항상 pull 먼저하는 습관이 좋다!

tag 달기

git tag v0.2 <log>
git push origin <tag_name>git git

tag 삭제

git tag --delete <name>
git push origin --delete v0.1

Readme?

포트폴리오 관리!
내가 어떤 프로젝트를 했는지

순서 * , + , -


profile
효율적인 걸 좋아해요

0개의 댓글