본문 바로가기

Rebase5

[Git] 내 코드 파일 배포 A to Z 1. repository 생성   2.Setting > Developer settings > Personal access tokens > Tokens (classic) > Generate new token repo 관련 접근 허용하고,,    3. 해당 폴더로 가서 git init- .git 디렉토리가 생성- 여기에 저장소의 모든 버전 관리 정보가 저장됩git remote add origin https://[token]@github.com/USERNAME/REPOSITORY.git  확인git remote -v # origin https://github.com/USERNAME/REPOSITORY.git (fetch)# origin https://github.com/USERNAME/REPOSITORY... 2024. 12. 8.
[Git] git rebase - commit 기록을 정리하고 싶다! Github README를 정리 중  브랜치 내에서 하나로 합칠  필요성을 느꼈다.    첫 번째 커밋의 앞에는 pick을 그대로 두고, 두 번째 커밋의 앞에는 squash (또는 s)를 입력합니다. 이를 통해 두 번째 커밋이 첫 번째 커밋에 합쳐지게 됩니다 순서는 상관없이 서로 합쳐진 후 새로운 commit id를 가진다.그렇지만, 반대로 하면 안 이루어지긴 한다. 또, 위 내용은 Vim 편집기 여서 저장 후 나가기 명령어인 :wq를 작성 후  원래 prompt로 돌아오게 되면 다음과 같이 되고   - 강제 push!git push origin [branch name] --force  성공적으로 변경했다! 2024. 8. 14.
[Git] git commit하고 push 시 다른 팀원이 올렸을 경우 열심히 작업 중 commit 하고, 점검 중에 있는데!! 누가 push 해버렸다!?git push origin backup_branch To https://github.com/addinedu-ros-5th/ros-repo-5.git ! [rejected] backup_branch -> backup_branch (fetch first)error: failed to push some refs to 'https://github.com/addinedu-ros-5th/ros-repo-5.git'hint: Updates were rejected because the remote contains work that you dohint: not have locally. This is usually cause.. 2024. 8. 4.
[Git] git rebase 후, git cherry-pick https://studyhoons.tistory.com/19 Github 사용 배경과 git 소개 - reportGit과 버전 관리 시스템 -  현대 소프트웨어 개발의 필수 도구소프트웨어 개발에서 버전 관리는 핵심적인 과정입니다. 과거에는 수동 백업과 릴리스 관리를 통해 이루어졌던 이 작업이, 오늘날studyhoons.tistory.com (위 사진을 참고하여 진행하면 좋다.) 맨날 merge만 하다가 rebase를 할 수 밖에 없는 상황에 마주쳤다.git branch backup_branchgit rebase -i  확인 --> 안됨왜냐하면 변경을 안했기 때문이다.   /home/tspoon/workspace/ros-repo-5/.git/rebase-merge/git-rebase-todo .. 2024. 7. 25.
[Git] git add 되돌리기, git commit 되돌리기 1. git add 되돌리기  - git restoregit add 는 working directory에 있는 내용을 staging area로 옮기는 작업이다! - beforegit restore .vscode/settings.json 전체 staged area(repository)에 있는 모든 파일을 working directory로 git restore --staged . - after 2. git commit 되돌리기2-1. git log 확인 git log --oneline   2-2-1 git revert - 돌아가는 것 또한 commit 기록으로 남기고 싶을 때git revert  2-3 HEAD가 가리키는 지점부터 하나! 지우기  커밋에 대한 영향스테이지 영역에 대한 영향작업 디렉토리에 대한.. 2024. 7. 22.