1. Github push (업로드,병합)

윤주헌's avatar
Aug 18, 2024
1. Github push (업로드,병합)

1. 깃 허브 들어가서 로그인 하고

notion image
notion image
글 적어주기
notion image
하단에 create 누르기
notion image

2. 여기까지 했다면 git에서 init한 상태다

notion image

3. 만들 폴더에 폴더 2개 만들기

ex10.company, ex10.home
notion image
ex10.company폴더 들어가서 myapp폴더 만들어주기

4. 회사에 git init 하기

notion image

4.1 myapp 폴더 들어가서 우클릭 후 gitbash 들어가서 git init 하기

4.2 프로제트 설정txt만들기

git bash에서
💡
touch 프로젝트설정.txt
notion image
git add . → git commit -m “프로제그 설정완료” 까지 해주기
notion image

5. 업로드 연결

회사 myapp에서 깃허브 컴퓨터 myapp에 업로드 하고싶어 → 깃허브 클라우드 저장소를 origin이라 한다
  • 깃허브 클라우드저장소 중요 중요 중요 바꿀 수 있는데 그냥 사용 ㄱ
💡
origin

5.1 연결방법

💡
git remote add origin https주소
  • https 주소는 github 해당 레파지토리에 가면 있다
  • 네모 두 개 겹쳐있는거 클릭해서 origin 뒤에 우클릭 paste하면 붙여넣기 됨
notion image
notion image

5.2 연결됐는지 확인

  • 아무거나 상관 없음
💡
git remote -v
notion image
💡
git ls-remote
notion image
연결 됐으면 업로드, 다운로드 둘 다 가능하다
notion image
 
이제 origin에 1. 파일 업로드 해야하고 2. 병합해야 함
 
두 가지 한번에 하는게 push

6. origin 가지에 push 하기

💡
git push origin master
notion image
notion image
Authorize git-ecosystem 눌러주기
notion image
 
notion image
이렇게 git bash에 뜨고
git hub사이트에 들어가면 master이 나온다
notion image
Share article

code-sudal