물음표 살인마의 개발블로그

Back-End TIL/Git, Github 4

220920 Github 에러

로컬 저장소에 있는 프로젝트를 깃허브 사이트를 통해 만든 저장소로 push 하는 경우에 이런 메세지가 뜨는 경우가 있다. 1 2 3 4 5 6 7 8 C:\Users\gitProject>git push origin master To https://github.com/userId/userProject.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://github.com/userId/userProject.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote coun..

220916 Git/Github - 3

Renaming $ mv revert.md reverted.md - 이름을 바꾸려고 했는데, 깃에서는 원래 파일을 지우고, 새로운 파일이 생기게된다. $ git mv revert.md reverted.md 를 사용하면 이름이 바뀐다. $ git commit - #Fix: Rename Undo $ git restore reverted.md - undo at the point it is commited $ git restore . - undo all the files in the current, sub directory Unstaging git reset HEAD reverted.md - Unstaging (Before commiting) Edit latest Commit $ git commit --amen..

220915 TIL - Git/GitHub - 2

자습시간에 어제 배웠던 Git add, commit, push를 복습해봤다. 우선 Github에서 새로운 Repository를 생성. Spiderman-Revise. Git Bash에서 Dev directory에 $ Git clone [HTTPS 주소]을 했다. touch spiderman.md 로 파일 생성. $ git branch TobeyMaguire 로 브랜치 생성. $ git branch AndrewGarfield $ git branch Tom_Holland 나머지 동일 spiderman.md git add, git commit을 실행하지 않아서인지 branch들에 파일이 없다.. 다시 브랜치들을 다 지우고, $ git branch -D TobeyMaguire, $ git~~~, ~~~~ mai..