- 깃을 설치하면 로컬에서 돌아간다.
- 로컬에서 .git init를 하여 초기 값을 설정한다.
- git config --global user.name
- git config --glboal user.email
- git help tutorial
- git help log
- git config --list
- echo > "example.txt" (q로 탈출)
- del "파일" (삭제)
- git status
- git commit
- git diff --cached
- git show (커밋 해쉬값)
- git reset --hard HEAD^
- git checkout (커밋 해쉬값)
- git log
- git branch
- git switch "master"
- 깃허브 사이트에서 만든 레포에서 add 버튼에 있는 URL의 git 주소를 가져온다.
https://github.com/leonadro-3/e-shop.git
- 다음 과정을 거친다.
PS C:\Users\82106\Desktop\backend> git remote add origin https://github.com/leonadro-3/e-shop.git
PS C:\Users\82106\Desktop\backend> git remote -v
origin https://github.com/leonadro-3/e-shop.git (fetch)
origin https://github.com/leonadro-3/e-shop.git (push)
PS C:\Users\82106\Desktop\backend> git branch
* master
PS C:\Users\82106\Desktop\backend> git push origin master
Enumerating objects: 993, done.
Counting objects: 100% (993/993), done.
Delta compression using up to 16 threads
Compressing objects: 100% (939/939), done.
Writing objects: 100% (993/993), 1013.77 KiB | 1.62 MiB/s, done.
Total 993 (delta 157), reused 0 (delta 0), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (157/157), done.
remote:
remote: Create a pull request for 'master' on GitHub by visiting:
remote: https://github.com/leonadro-3/e-shop/pull/new/master
remote:
To https://github.com/leonadro-3/e-shop.git
* [new branch] master -> master
PS C:\Users\82106\Desktop\backend>
- 자동으로 main과 master 브런치가 분리되어 업로드 된다.
PS C:\Users\82106\Desktop\backend> git push orgin master
fatal: 'orgin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
PS C:\Users\82106\Desktop\backend>
로컬에서 작업한 것들을 깃허브로 업로드하기 위해 push를 했지만 오류가 뜬다.
PS C:\Users\82106\Desktop\backend> git push origin master
철자가 틀렸다.