Git - Downloading Package
Downloading Git Now What? Now that you have downloaded Git, it's time to start using it.
git-scm.com
git init (깃 생성)
Microsoft Windows [Version 10.0.19041.804] (c) 2020 Microsoft Corporation. All rights reserved. C:\Users\bit\Documents\boiler-plate>git init Initialized empty Git repository in C:/Users/bit/Documents/boiler-plate/.git/ C:\Users\bit\Documents\boiler-plate>git status On branch master No commits yet Untracked files: (use "git add <file>..." to include in what will be committed) index.js models/ node_modules/ package-lock.json package.json nothing added to commit but untracked files present (use "git add" to track) C:\Users\bit\Documents\boiler-plate>
git add를 하면 소ㅑㄹ라소ㅑㄹ라~~ 라이브러리까지 다 올라감.. (staging area에)
C:\Users\bit\Documents\boiler-plate>git add . warning: LF will be replaced by CRLF in node_modules/.bin/mime. The file will have its original line endings in your working directory warning: LF will be replaced by CRLF in node_modules/.bin/mime.ps1. The file will have its original line endings in your working directory warning: LF will be replaced by CRLF in node_modules/.bin/semver. The file will have its original line endings in your working directory
C:\Users\bit\Documents\boiler-plate>git status On branch master No commits yet Changes to be committed: (use "git rm --cached <file>..." to unstage) new file: index.js new file: models/User.js new file: node_modules/.bin/mime new file: node_modules/.bin/mime.cmd new file: node_modules/.bin/mime.ps1 new file: node_modules/.bin/semver new file: node_modules/.bin/semver.cmd
staging area에 올라간 ㅎㅎ.. node_modules (라이브러리)는 지워준다..
C:\Users\bit\Documents\boiler-plate>git rm --cached node_modules -r rm 'node_modules/.bin/mime' rm 'node_modules/.bin/mime.cmd' rm 'node_modules/.bin/mime.ps1' rm 'node_modules/.bin/semver' rm 'node_modules/.bin/semver.cmd' rm 'node_modules/.bin/semver.ps1' rm 'node_modules/@types/bson/LICENSE
그리고 .gitignore 만들어줌..

commit -m "메모"
(깃허브에서 메모하는거랑 같은 것..)
C:\Users\bit\Documents\boiler-plate>git status On branch master No commits yet Changes to be committed: (use "git rm --cached <file>..." to unstage) new file: index.js new file: models/User.js new file: package-lock.json new file: package.json Untracked files: (use "git add <file>..." to include in what will be committed) .gitignore C:\Users\bit\Documents\boiler-plate>git commit -m "처음 저장소 올림" [master (root-commit) 1540315] 처음 저장소 올림 4 files changed, 668 insertions(+) create mode 100644 index.js create mode 100644 models/User.js create mode 100644 package-lock.json create mode 100644 package.json C:\Users\bit\Documents\boiler-plate>git status On branch master Untracked files: (use "git add <file>..." to include in what will be committed) .gitignore C:\Users\bit\Documents\boiler-plate>git commit -m "깃이그노어 추가" [master 684ec62] 깃이그노어 추가 1 file changed, 1 insertion(+) create mode 100644 .gitignore C:\Users\bit\Documents\boiler-plate>git status On branch master nothing to commit, working tree clean C:\Users\bit\Documents\boiler-plate>
'DB > ETC' 카테고리의 다른 글
[mongodb] model & Schema 생성 (0) | 2021.02.24 |
---|---|
[mongodb] 유저생성 및 nodejs 몽고 DB연결 (0) | 2021.02.24 |
[mongodb] 몽고DB 클러스터 생성하기 (0) | 2021.02.24 |