본문 바로가기

Push4

[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] window에서 이미 푸시된 커밋을 삭제하는 방법 os: window 11   (How to delete a pushed commit on Windows OS )git push를 했는데 저런.. 파일을 잘못 올려버렸다. 폴더 속 폴더를 올린 것이다.이미 push된 commit 기록은 웹사이트에서 제거할 수 없다.따라서 git을 설치하여 수정하도록 한다. Git - Downloadshttps://git-scm.com/downloads Git - DownloadsDownloads macOS Windows Linux/Unix Older releases are available and the Git source repository is on GitHub. Latest source Release 2.47.0 Release Notes (2024-10-06) Dow.. 2024. 11. 8.
[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 push 실수 후 되돌리기 1. 해당 브랜치로 이동 후 최신 상태로 업데이트하기 git checkout devgit fetch origingit pull origin dev 2. 리셋하고자 하는 마지막 커밋(2b2983c~)으로  리셋  git reset --hard 2b2983c --hard를 하게 되면 내 working directory도 초기화 되니 --soft를 하면, 내 working diretory는 변함없음  3. 변경사항을 강제로 원격 저장소에 pushgit push origin dev --force *주의점* 이미 다른 사람이 최신 버전을 가지고 있다면, 그들의 로컬 저장소와 충돌이 발생할 수 있다!!팀원들과 상의하는 것을 추천! 2024. 7. 22.