Code Monkey home page Code Monkey logo

git's Introduction

Git 명령어 정리

시작하기

1. 설치

https://git-scm.com/

2. 버전확인

git -v

3. 사용자 정보

git config --global user.name "JinwooKing"
git config --global user.email "[email protected]"

4. 설정 확인

git config --list

5. 도움말 보기

git help config
git help <verb>

저장소 만들기

1. 로컬 리포지토리 생성

git init

2. 파일 추적 시작

git add .

3. 파일 커밋

git commit -m "first commit"

4. 브랜치 메인 변경

git branch -m main

5. 원격 리포지토리 등록

git remote add origin "HTTPS URL"

6. 푸시

git push origin main
git push <remote> <branch>

7. 풀

git pull origin main
git pull <remote> <branch>

ETC

1. README.md 파일 생성

$ echo sampleText > README.md

2. gitignore 파일 생성

$copy con.gitignore
 sampleText
 ^z or ^c

3. 이미 추적중인 파일 무시하기

git rm -r --cached .
git add .
git commit -m "clear git cache"
git push -u origin main

4. 주의사항

.gitignore파일에 확장자 붙지 않도록 조심
ex).gitignore.txt 

git's People

Contributors

jinwooking avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.