๐ŸŒฑrepo VSC ์—ฐ๊ฒฐ

๊ถŒ๊ทœ๋ฆฌยท2024๋…„ 2์›” 26์ผ
0

๐Ÿ‘ฉ๐Ÿปโ€๐Ÿ’ปFrontEnd

๋ชฉ๋ก ๋ณด๊ธฐ
19/29

  • working Directory : git add ์ „์˜ ์ƒํƒœ
> git status

On branch main
Untracked files:
  (use "git add <file>..." to include in what will be committed)
        .gitignore

nothing added to commit but untracked files present (use "git add" to track)   
  • staging Area : git add ํ›„์˜ ์ƒํƒœ
> git status

On branch main
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        new file:   .gitignore
  • Git repository(Local) : add ํ›„, git commit -m์„ ํ†ตํ•˜์—ฌ Local์— ์ €์žฅ
> git commit -m ".gitignore ํŒŒ์ผ ์ƒ์„ฑ"

[main 7c9e78c] .gitignore ํŒŒ์ผ ์ƒ์„ฑ
 1 file changed, 1 insertion(+)
 create mode 100644 .gitignore
  • Git repository(Remote) : ์ปค๋ฐ‹๋ฉ”์‹œ์ง€ ๋“ฑ๋ก ํ›„, git push๋ฅผ ํ†ตํ•˜์—ฌ Remote์— ์ €์žฅ
> git push origin main

Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 4 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 301 bytes | 301.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To https://github.com/Gyuuul/Node.js.git
   1268470..7c9e78c  main -> main

1. GitHub์—์„œ repo ์ƒ์„ฑ

2. repo ์ฃผ์†Œ ๋ณต์‚ฌ

3. ์›๊ฒฉ ์ €์žฅ์†Œ ์ง€์ •

$ git init
$ git remote add origin [ ๋ณต์‚ฌํ•œ ์ €์žฅ์†Œ ์ฃผ์†Œ ]

4. ์›๊ฒฉ ์ €์žฅ์†Œ ๋‚ด์šฉ์„ ๋กœ์ปฌ ์ €์žฅ์†Œ์— ๋ฐ˜์˜ (๊ทธ๋ž˜์•ผ push ์ž˜๋จ)

$ git pull origin main --allow-unrelated-histories
profile
๊ธฐ๋ก์žฅ ๐Ÿ“

0๊ฐœ์˜ ๋Œ“๊ธ€