목록git (6)
HEROJOON 블로그(히로블)

GitHub에 Push하려고 할 때 기존에는 username, password로 push가 되었지만, 어느 순간부터 push가 되지 않으면서 아래와 같은 에러가 출력되었습니다. 1. Error명 C:\Users\herojoon\IdeaProjects\sameple-project>git push -u origin master Logon failed, use ctrl+c to cancel basic credential prompt. Username for 'https://github.com': herojoon432@gmail.com Password for 'https://herojoon432@gmail.com@github.com': remote: Support for password authenticatio..
목표 원격 저장소(ex. Github)에 Push를 잘못했을 경우 Commit History에서 해당 내용을 제거하고 싶을 때가 있습니다. 이럴 경우 원하는 Commit HashCode(Commit ID) 시점으로 되돌릴 수 있습니다. 사용할 명령어 정리 # 원하는 Commit HashCode(Commit ID)로 되돌리기 # git reset --hard {Commit HashCode} git reset --hard 61204e63b3dae72f61712dd994a1da106212c36a # 위에서 설정한 내용 원격 저장소에 push # git push origin +{branch} # 여기서 +는 강제의 의미 git push origin +develop
# Github Repository의 branch 제거하기 # git push origin --delete {branch명} git push origin --delete mybranch

목표 작업한 파일 중 원하는 파일만 Commit & Push하기 사용할 명령어 정리 // git status명령어를 이용하여 작업한 파일 목록 확인하기 git status // git diff명령어를 이용하여 기존파일의 변경내역 확인하기 git diff // git add명령어를 이용하여 원하는 파일 추가하기 git add ... // git reset명령어를 이용하여 add된 파일 취소하기 git reset HEAD 해보기 // git status 명령어로 신규 혹은 변경 파일 확인하기 (작업 파일들이 이정도 있구나.. 생각하면 되요) git status // git diff명령어로 변경내역 확인하기 (기존에 있던 파일에서 어느 코드가 수정되었는지 확인할 수 있어요) // git diff // git ..

목표 git config --global 설정을 알아보자. 사용할 명령어 정리 // git config --global 유저정보 등록 git config --global user.name // git config --global 유저정보 제거 git config --unset --global user.name // git config --global 등록정보 확인 git config --global --list 언제 쓸까요 내 System(PC)에서 Git 저장소를 사용할 경우 Commit User정보를 Custom하게 전역 설정하여 사용할 수 있습니다. 써보자 // System(내PC기준)에서 사용할 전역 User Name 등록 // git config --global user.name git conf..

*Last Update: 2021-09-16 GitHub Repository를 private로 생성할 경우 인증 정보 입력해야함 추가. 1. 로컬환경에 Project 만들기 : 로컬환경에 Project를 생성합니다. 2. GitHub에 빈 Repository 만들기 **로컬에 만든 프로젝트와 동일한 이름으로 GitHub -> Repository 프로젝트를 생성해줍니다. !주의 : Repository 생성 시 Initialize this repository with a README는 체크하지 말 것. - 이유: 로컬에서 생성한 프로젝트를 GitHub에 Push할 때, README파일 충돌 에러가 있을 수 있으므로 README파일을 생성하지 않습니다. 추후 README파일은 쉽게 생성 가능하니 과감히 포기할..