기타 4

[Git] git reset 동작 차이

명령어커밋 삭제스테이징 취소파일 변경 유지git reset --soft HEAD~1✅ 삭제됨❌ 유지됨❌ 유지됨git reset --mixed HEAD~1✅ 삭제됨✅ 취소됨❌ 유지됨git reset --hard HEAD~1✅ 삭제됨✅ 취소됨✅ 삭제됨  로컬 저장소에 new.txt를 만들어 테스트를 진행했다.  git add 를 통해 변경사항을 반영해주었다. git status 로 확인하면 staged 상태인 것을 알 수 있다.  new라는 메시지를 담아 커밋을 올렸다.git commit -m "new" git log 를 통해 로그를 확인한다.  1. git reset --soft HEAD~1stage 상태 유지, 커밋 삭제, 로컬 저장소 파일 유지lsnew.txt README.md test.txt ..

기타 2025.03.18

[Git] 브랜치 생성과 원격에 등록

원격 저장소에 main 브랜치만 있고 user1 이 없는 경우 git push 할 때 오류가 발생한다.오류 내용은 다음과 같다.fatal: The current branch user1 has no upstream branch.To push the current branch and set the remote as upstream, use git push --set-upstream origin user1 로컬 브랜치 user1 을 원격에 연결시켜야 한다. 원격 저장소에 user1 브랜치를 생성하고 업스트림 브랜치로 설정을 하려면 아래 명령을 실행해야 한다.git push --set-upstream origin user1 이때 다음과 같은 에러가 발생했다.비밀번호를 사용한 인증을 2021년 8월 13일 ..

기타 2025.03.18

[Git Bash] WARNING: You are using pip version 21.2.4; however, version 23.3.1 is available.You should consider upgrading via the 'D:\Program Files\Python310\python.exe -m pip install--upgrade pip' command.

WARNING: You are using pip version 21.2.4; however, version 23.3.1 is available.You should consider upgrading via the 'D:\Program Files\Python310\python.exe -m pip install--upgrade pip' command. pip 버전 업데이트를 진행하라는 의미이다. 해결:  python.exe -m pip install --upgrade pip

기타 2025.03.13