역량강화 프로젝트 - 환경 셋팅

konut ko·2022년 10월 6일
0
post-custom-banner

도커 컨테이너 켜기

  • windows power shell

docker-compose ps
상태 확인 후
docker-compose up
켜기 (down은 끄기)

vs code에서 extentions 깔기


remote-containers: attach~~ 누르고

치고

open folder 해서 f1에 경로를 /app/ 쳐서 프론트랑 백 하나씩 연다.

vs code 에서 git 다시 설정함

root@0a6db46917a8:/app# git status
On branch develop
nothing to commit, working tree clean

root@0a6db46917a8:/app# rm -rf ./*

root@0a6db46917a8:/app# ls

root@0a6db46917a8:/app# ls -al
total 4
drwxrwxrwx 1 root root 4096 Oct 6 05:23 .
drwxr-xr-x 1 root root 4096 Oct 6 00:58 ..
-rwxrwxrwx 1 root root 410 Oct 6 00:37 .eslintrc.json
drwxr-xr-x 1 root root 4096 Oct 6 05:23 .git
-rwxrwxrwx 1 root root 222 Oct 6 00:37 .gitignore
drwxrwxrwx 1 root root 4096 Oct 6 00:37 .vscode

root@0a6db46917a8:/app# rm -rf .git

root@0a6db46917a8:/app# ls -al
total 4
drwxrwxrwx 1 root root 4096 Oct 6 05:23 .
drwxr-xr-x 1 root root 4096 Oct 6 00:58 ..
-rwxrwxrwx 1 root root 410 Oct 6 00:37 .eslintrc.json
-rwxrwxrwx 1 root root 222 Oct 6 00:37 .gitignore
drwxrwxrwx 1 root root 4096 Oct 6 00:37 .vscode

root@0a6db46917a8:/app# cd ..

root@0a6db46917a8:/# git clone https://github.com/Woonani/mini_project_BE.git ./app
fatal: destination path './app' already exists and is not an empty directory.

root@0a6db46917a8:/# cd app/

root@0a6db46917a8:/app# rm -rf .*
rm: refusing to remove '.' or '..' directory: skipping '.'
rm: refusing to remove '.' or '..' directory: skipping '..'

root@0a6db46917a8:/app# ls

root@0a6db46917a8:/app# cd ..

root@0a6db46917a8:/# ls
app boot etc lib media opt root sbin sys usr
bin dev home lib64 mnt proc run srv tmp var

root@0a6db46917a8:/# git clone https://github.com/Woonani/mini_project_BE.git ./app

Cloning into './app'...
remote: Enumerating objects: 45, done.
remote: Counting objects: 100% (45/45), done.
remote: Compressing objects: 100% (32/32), done.
remote: Total 45 (delta 8), reused 45 (delta 8), pack-reused 0
Unpacking objects: 100% (45/45), done.

root@0a6db46917a8:/# cd app/

root@0a6db46917a8:/app# git remote -v
origin https://github.com/Woonani/mini_project_BE.git (fetch)
origin https://github.com/Woonani/mini_project_BE.git (push)

============
깃 상태확인 : 내가 어디 브랜치에 있는지
=========

root@0a6db46917a8:/app# git status
On branch develop
Your branch is up-to-date with 'origin/develop'.
nothing to commit, working tree clean

root@0a6db46917a8:/app# git pull origin develop
From https://github.com/Woonani/mini_project_BE

  • branch develop -> FETCH_HEAD
    Already up-to-date.

root@0a6db46917a8:/app# git checkout -b nani1
Switched to a new branch 'nani1'

root@0a6db46917a8:/app# git status
On branch nani1
nothing to commit, working tree clean

root@0a6db46917a8:/app# git status
On branch nani1
Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git checkout -- ..." to discard changes in working directory)

    modified:   README.md

no changes added to commit (use "git add" and/or "git commit -a")

root@0a6db46917a8:/app# git add .

root@0a6db46917a8:/app# git commit -m "readme memo"
[nani1 9c5e0f8] readme memo
1 file changed, 1 insertion(+), 1 deletion(-)

root@0a6db46917a8:/app# git push origin rani1
error: src refspec rani1 does not match any.
error: failed to push some refs to 'https://github.com/Woonani/mini_project_BE.git'

root@0a6db46917a8:/app# git push origin nani1
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 289 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
remote:
remote: Create a pull request for 'nani1' on GitHub by visiting:
remote: https://github.com/Woonani/mini_project_BE/pull/new/nani1
remote:
To https://github.com/Woonani/mini_project_BE.git

  • [new branch] nani1 -> nani1

root@0a6db46917a8:/app# git status
On branch nani1
nothing to commit, working tree clean

root@0a6db46917a8:/app#

nvm 버전 맞춤

PS C:\bootpj> nvm install 14.16.1

Downloading node.js version 14.16.1 (64-bit)...
Complete
Creating C:\Users\User\AppData\Roaming\nvm\temp

Downloading npm version 6.14.12... Complete
Installing npm v6.14.12...

Installation complete. If you want to use this version, type
nvm use 14.16.1

PS C:\bootpj>

PS C:\bootpj> nvm use 14.16.1

Now using node v14.16.1 (64-bit)

PS C:\bootpj> nvm current

v14.16.1
PS C:\bootpj>

=======================

https://www.daleseo.com/git-push/

profile
보초딩코라 틀린 내용 있을 수도 있습니다. 댓글 지적 환영
post-custom-banner

0개의 댓글