본문 바로가기

github12

[Git] 내 로컬 pc에서 작업 중인 repo를 깃허브 repo로 올리는 절차 1. Initialize a Git Repository   2. .gitignore 파일 만들어 보안 및 메모리 정리   3. README.md 작성으로 프로젝트 설명  4. GitHub CLI(gh) 설치https://github.com/cli/cli/releases/latest Release GitHub CLI 2.66.1 · cli/cliHotfix: gh pr view fails with provided URL This addresses a regression in gh pr view was reported in #10352. This regression was due to a change in v2.66.0 that no longer allowed gh pr subcommands ...githu.. 2025. 2. 5.
[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] github 최근 커밋 수정사항 반영: git commit --amend 1. git add ./ 2. git commit --amend  3. ":wq" 명령어(저장 후 나감)로 나가기   4. git push origin main --force 2024. 11. 26.
[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] main에 쓰여진 작업들 새로운 브랜치를 만들어 이동 1. 새로운 branch   git checkout -b new-branch-name 2. 커밋 내역 확인git log --oneline // 커밋 메시지를 한 줄로 간단히 표시git log -n 5 //최근 5개의 커밋만 표시git log --since="2 weeks ago" // 최근 2주간의 커밋만 표시  f2b7c3e: 커밋 해시(HEAD -> 2study): 현재 HEAD가 가리키는 브랜치musicPlayer v0.1: 커밋 메시지   3. 새로운 브랜치에서 새롭게 재탄생git checkout [new branch]git reset --hard   4. 기존 브랜치에서 커밋 삭제 git checkout maingit reset --hard HEAD~n   5. branch push --> er.. 2024. 11. 1.
[Git] git rebase - commit 기록을 정리하고 싶다! Github README를 정리 중  브랜치 내에서 하나로 합칠  필요성을 느꼈다.    첫 번째 커밋의 앞에는 pick을 그대로 두고, 두 번째 커밋의 앞에는 squash (또는 s)를 입력합니다. 이를 통해 두 번째 커밋이 첫 번째 커밋에 합쳐지게 됩니다 순서는 상관없이 서로 합쳐진 후 새로운 commit id를 가진다.그렇지만, 반대로 하면 안 이루어지긴 한다. 또, 위 내용은 Vim 편집기 여서 저장 후 나가기 명령어인 :wq를 작성 후  원래 prompt로 돌아오게 되면 다음과 같이 되고   - 강제 push!git push origin [branch name] --force  성공적으로 변경했다! 2024. 8. 14.