git push2 [Git] Branch 만들어 commit하고 Push하기 Master나 Main Develop Branch에서 직접 작업하면 문제 생길 수가 있다. Branch에서 clone해서 다른 branch를 만들어 update하는 절차는 아래와 같다. 1) Branch 가져오기 > git clone -b develop --single-branch http://xxxx/yyyy.git 2) 새로운 Branch 생성 # kkkk branch 생성 > git checkout -b "kkkk" # 현재 git branch 확인 > git status On branch kkkk 3) Code 수정 후 Commit 하기 # 변경된 내용 추가 > git add . # account 확인 : GitLab의 내 id > git config user.name "my_id" # commi.. 2022. 7. 21. [Git] Git에 Push하기 Git에 프로젝트 만들어서 Upload (Push) 하기 위해서는 아래의 절차를 따른다. 1. github.com에서 새로운 repository 생성 (여기서는 Lottery로 지음) 2. Local 에서 해당 Repository에 올릴 디렉토리로 이동해서 아래 수행 > git init > git add . > git commit -m "initial commit" > git remote add origin https://github.com//lottery.git > git branch -M main > git push -u origin main Branch 이름을 main으로 하고 Push한 결과 2022. 4. 18. 이전 1 다음