똑같은 삽질은 2번 하지 말자
git Command 본문
- git rebase {branch_name} : 해당 브랜치를 base로 한다.
- git rebase --continue : conflict 해결하고 계속해서 rebase하기, git rebase --abort : rebase작업취소
- git cherry-pick {commit_name} : 다른 branch에서 commit 한개 가져오기 (conflict는 안생기지만 새로운 commit이 생김)
- git reflog : HEAD 나열 보기 , git result HEAD@{14} --hard : 해당 헤드로 강제이동
- git checkout -t origin/{branch_name} : 원격 브랜치를 로컬 브랜치로 바로 가져오기
- git branch {branch_name} : 브랜치 생성하기
- git branch -r : 원격 브랜치 목록보기
- git branch -a : 로컬 브랜치 목록보기
- git branch -m {branch_name} {change_branch_name} : 브랜치 이름 바꾸기
- git branch -d {branch_name} : 브랜치 삭제하기
- git push origin -- delete {branch_name} : 원격 브랜치 삭제하기 ( git push origin — delete gh-pages )
- git commit -m “commit_description” : 선택한 코드 설명 적기 ( git commit -m “내용”)
- git push origin {branch_name} : add하고 commit한 코드 git server에 보내기 (git push origin master)
- git push origin branch_name:branch_name :
- git pull : git서버에서 최신 코드 받아와 merge 하기
- git fetch : git서버에서 최신 코드 받아오기 merge는 안함
- git reset -- hard HEAD^ : commit한 이전 코드 취소하기
- git reset -- soft HEAD^ : 코드는 살리고 commit만 취소하기
- git reset -- merge : merge 취소하기
- git reset -- hard HEAD && git pull : git 코드 강제로 모두 받아오기
- git config --global user.name “user_name” : git 계정Name 변경하기
- git config --global user.email “user_email” : git 계정Mail변경하기
- git stash / git stash save “description” : 작업코드 임시저장하고 브랜치 바꾸기
- git stash pop : 마지막으로 임시저장한 작업코드 가져오기
- git branch --set-upstream-to=remote_path/branch_name : git pull no tracking info 에러해결
- git remote rm origin : fatal: remote origin already exists 에러 해결 기존 origin 제거 명령어
Updates were rejected because~~~
I need to get the latest information from remote locations first (pull) and upload it with what I've worked on.
https://medium.com/@joongwon/git-git-%EB%AA%85%EB%A0%B9%EC%96%B4-%EC%A0%95%EB%A6%AC-c25b421ecdbd
[Git] Git 명령어 정리
한동안 포스팅 주제도 못 잡았고 회사일이 너무 바빠서 블로그 엄두도 못 내다가 추석 연휴 때 고향에 내려가서 휴식을 취하며 독서도 하고 포스팅도 하려고 했지만.. 그것도 여의치 않았다. 대신 어떤 주제에 대해서 포스팅할지 고민은 하였는데 그중에…
medium.com
'Spring > 忘れやすい概念' 카테고리의 다른 글
이클립스가 갑자기 안될때! 마크창에서 안넘어갈때! (0) | 2020.06.06 |
---|---|
redirect / forward 日本語で (0) | 2020.04.03 |
ResponseEntity (0) | 2019.09.07 |
Lombok (0) | 2019.08.18 |
Spring 에서 ajax로 여러가지 데이터 보내서 @RequestBody로 받기 (0) | 2019.08.04 |
Comments