WorkaHolic

Git 세팅 본문

Develop/Git

Git 세팅

Programics 2021. 5. 24. 14:29

The repository for this project is empty

You can get started by cloning the repository or start adding files to it with one of the following options.

이 프로젝트의 저장소가 비어 있습니다.

저장소를 복제하여 시작하거나 다음 옵션 중 하나를 사용하여 저장소에 파일을 추가 할 수 있습니다.

 

Command line instructions

You can also upload existing files from your computer using the instructions below.

명령 줄 지침

아래 지침에 따라 컴퓨터에서 기존 파일을 업로드 할 수도 있습니다.

 

- Git global setup

- Git 글로벌 설정

git config --global user.name "name"

git config --global user.email "emailname@email.com"

e.g. git config --global user.name "holic"

e.g. git config --global user.email "foobar@gmail.com"

* 확인

git config --list

 

- Create a new repository

- 새 저장소 만들기 (git clone gitAddress)

git clone git@gitlab.com:holic_generic/current.git

cd current_location

touch README.md

git add README.md

git commit -m "add README"

git push -u origin master

 

- Push an existing folder

- 기존 폴더를 Push (git remote add origin gitAddress)

cd existing_folder

git init

git remote add origin git@gitlab.com:holic_generic/current.git

git add .

git commit -m "Initial commit"

git push -u origin master

 

- Push an existing Git repository

- 기존 Git 저장소를 Push

cd existing_repo

git remote rename origin old-origin

git remote add origin git@gitlab.com:holic_generic/current.git

git push -u origin --all

git push -u origin --tags

반응형

'Develop > Git' 카테고리의 다른 글

Git Rm  (0) 2022.03.01
Branch를 Main(a.k.a. Master)로 변경  (0) 2021.05.24
Git Log  (0) 2021.05.24
Git Merge  (0) 2021.05.24
Git Reset  (0) 2021.05.24