Notice
Recent Posts
Recent Comments
Link
250x250
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
Tags
- serverless
- node
- 금융소득
- lambda
- python
- 경매
- 인덱싱
- 세금계산서
- route53
- 산지연금
- boto3
- 성능개선
- 양도소득세
- 신탁공매
- kubectl
- 외국납부세액공제
- 임업후계자
- command
- pod
- OpenSearch
- 정책자금
- Kubernetes
- 공매
- 매입불공제
- S3
- 농지연금
- Filter
- Resolver
- 리소스
- AWS
Archives
- Today
- Total
진지한 개발자
Git 본문
728x90
git 초기 등록
git init
git add .
git commit -m "Add existing project ro Git first"
git remote add origin https://github.com/~~~~~.git
git push -u -f origin master
$ git log
git push
git branch <new_branch>
git add .
git commit -m "comment"
git push
git merge
git merge master
git push --set-upstream origin <branch>
git checkout master
git pull
git merge <branch>
git push origin master
git stash
git stash
git checkout master
git pull
git branch -D <old_branch>
git checkout -b <new_branch>
git stash list
git stash pop
git stash pop[0]
git commit 취소
// [방법 1] commit을 취소하고 해당 파일들은 staged 상태로 워킹 디렉터리에 보존
$ git reset --soft HEAD^
// [방법 2] commit을 취소하고 해당 파일들은 unstaged 상태로 워킹 디렉터리에 보존
$ git reset --mixed HEAD^ // 기본 옵션
$ git reset HEAD^ // 위와 동일
$ git reset HEAD~2 // 마지막 2개의 commit을 취소
// [방법 3] commit을 취소하고 해당 파일들은 unstaged 상태로 워킹 디렉터리에서 삭제
$ git reset --hard HEAD^
https://gmlwjd9405.github.io/2018/05/25/git-add-cancle.html
728x90
'IT > git' 카테고리의 다른 글
원격 저장소의 master로 정리하고 싶을 때 (0) | 2023.06.02 |
---|---|
GIT merge conflict 났을때 (0) | 2023.04.28 |
Git Conflict 났을 때 (0) | 2023.04.13 |