Skip to content

๐Ÿงฉ ๊ณผ์ œ๋ฅผ ๊นƒํ—ˆ๋ธŒ์— Push ํ•˜๋Š” ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค

Notifications You must be signed in to change notification settings

DO-SOPT-WEB/notice-git-push

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 

Repository files navigation

๐ŸŒฑ ์›นํŒŒํŠธ Github๋กœ ๊ณผ์ œ๋ฅผ ์ œ์ถœํ•ด๋ด…์‹œ๋‹ค ๐ŸŒฑ

1๏ธโƒฃ Github Organiztion ๋ฐฉ๋ฌธ

image


2๏ธโƒฃ ๋‚ด Repository ์ฐพ๊ธฐ

image


3๏ธโƒฃ ํด๋ก ํ•  url ๋ณต์‚ฌํ•˜๊ธฐ

Group 35963


4๏ธโƒฃ ํ„ฐ๋ฏธ๋„, cmd๋ฅผ ์—ด๊ณ , ๋‚ด๊ฐ€ ํ”„๋กœ์ ํŠธ๋ฅผ ๊ด€๋ฆฌํ•  ๋””๋ ‰ํ† ๋ฆฌ๋กœ ์ด๋™ํ•œ๋‹ค.

์ €๋Š” VSCode์—์„œ Open Folder๋กœ ํ”„๋กœ์ ํŠธ๋ฅผ ๊ด€๋ฆฌํ•˜๊ณ ์ž ํ•˜๋Š” ๋””๋ ‰ํ† ๋ฆฌ๋ฅผ ์—ด์–ด์ฃผ๊ณ , ๊ฑฐ๊ธฐ์„œ ํ„ฐ๋ฏธ๋„์„ ์—ด์—ˆ์Šต๋‹ˆ๋‹ค!


5๏ธโƒฃ Repository Clone ํ•˜๊ธฐ.

image

git clone {์•„๊นŒ ๋ณต์‚ฌํ•œ url}

์ค‘๊ด„ํ˜ธ๋Š” ๋„ฃ๋Š”๊ฑฐ ์•„๋‹™๋‹ˆ๋‹ค!

๐Ÿฏ ์–ด์ฉŒ๊ตฌ์ €์ฉŒ๊ตฌ done ์ด๋ผ ๋‚˜์˜ค๋ฉด, clone์ด ์™„๋ฃŒ๋œ ๊ฑฐ๋ž๋‹ˆ๋‹ค. 
๊ทธ๋Ÿผ ์—ฌ๋Ÿฌ๋ถ„์˜ repository์˜ ์ด๋ฆ„์œผ๋กœ ํด๋”๊ฐ€ ์ƒ์„ฑ๋  ๊ฑฐ์—์š”.

์ด๋™ํ•ด๋ด…์‹œ๋‹ค.

image

๐Ÿฏ ์ด ๋””๋ ‰ํ† ๋ฆฌ๋Š” ์ด์ œ git์ด ํ™œ์„ฑํ™” ๋œ ๋””๋ ‰ํ† ๋ฆฌ๊ฐ€ ๋์–ด์š”.
์—ฌ๋Ÿฌ๋ถ„์˜ ๊ฒฝ์šฐ์—๋Š” ํ•ด๋‹น ๋””๋ ‰ํ† ๋ฆฌ ์•ˆ์— ``README ํŒŒ์ผ``์ด ์žˆ์„ ๊ฑฐ์—์š”!

6๏ธโƒฃ ๋ธŒ๋žœ์น˜ ์ƒ์„ฑํ•˜๊ธฐ

๋ธŒ๋žœ์น˜๋Š” ์ž‘์—…ํ™˜๊ฒฝ์„ ๋ถ„๋ฆฌํ•ด์ฃผ๋Š” ์นœ๊ตฌ์—์š”.

์šฐ๋ฆฌ๋Š” ๋งค์ฃผ ๊ณผ์ œ๋งˆ๋‹ค ๋ธŒ๋žœ์น˜๋ฅผ ์ƒ์„ฑํ• ๊ฑฐ์—์š”.git

1์ฃผ์ฐจ ๊ณผ์ œ๋ฅผ ์ง„ํ–‰ํ•œ๋‹ค๊ณ  ๊ฐ€์ •ํ•˜๊ณ  week1 ์ด๋ผ๋Š” ๋ธŒ๋žœ์น˜๋ฅผ ๋งŒ๋“ค์–ด๋ด์š”.

์šฐ์„  git์ด ํ™œ์„ฑํ™” ๋˜์–ด์žˆ๋Š” ์—ฌ๋Ÿฌ๋ถ„ ๋ ˆํฌ์ด๋ฆ„์œผ๋กœ ๋˜์–ด์žˆ๋Š” ๋””๋ ‰ํ† ๋ฆฌ๋กœ ์ด๋™ํ•ด๋ด…์‹œ๋‹ค.

๋‹ค์Œ ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด์„œ week1 ๋ธŒ๋žœ์น˜๋ฅผ ์ƒ์„ฑํ•ด๋ณด์•„์š”.

git branch week1

์ž˜ ์ƒ์„ฑ๋˜์—ˆ์„๊นŒ์š”?

git branch

image

์œ„์™€ ๊ฐ™์ด week1 ๋ธŒ๋žœ์น˜๊ฐ€ ๋‚˜์˜จ๋‹ค๋ฉด ์ž˜ ์ƒ์„ฑ๋˜์—ˆ๋„ค์š”!


7๏ธโƒฃ ์ƒ์„ฑํ•œ ๋ธŒ๋žœ์น˜๋กœ ์ด๋™ํ•˜๊ธฐ

๋ธŒ๋žœ์น˜๋ฅผ ๋งŒ๋“ค์—ˆ์œผ๋ฉด ํ•ด๋‹น ๋ธŒ๋žœ์น˜๋กœ ์ด๋™ํ•ด์•ผ๊ฒ ์ฃ ?

๋‹ค์Œ ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•ด์„œ ์ด๋™ํ•ด๋ด…์‹œ๋‹ค.

git checkout week1

week1 ๋ธŒ๋žœ์น˜๊ฐ€ ์ •์ƒ์ ์œผ๋กœ ์ƒ์„ฑ๋˜์ง€ ์•Š์•˜๋‹ค๋ฉด ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ• ๊ฑฐ์—์š”!

  • ์ƒ์„ฑ๊ณผ ์ด๋™์„ ํ•œ ๋ฒˆ์— ํ•˜๋Š” ๋ช…๋ น์–ด

    git checkout -b week1

์ž˜ ์ด๋™ํ–ˆ๋Š”์ง€ ๋ณผ๊นŒ์š”?

git branch

image

๋„ค! ์ž˜ ์ด๋™ํ–ˆ๋‹ค๊ณ  ํ•˜๋„ค์š”.


8๏ธโƒฃ ์ƒ์„ฑํ•œ ๋ธŒ๋žœ์น˜์—์„œ ์ž‘์—…ํ•˜๊ณ  ์ปค๋ฐ‹ ํ•˜๊ธฐ

git status

image

๋ณ€๊ฒฝ์‚ฌํ•ญ์ด ์—†๋‹ค๊ณ , working tree ๊ฐ€ ๊นจ๋—ํ•˜๋‹ค๋„ค์š”!

์ด ๋ธŒ๋žœ์น˜์—์„œ ๊ณผ์ œ๋ฅผ ์ˆ˜ํ–‰ํ•œ๋‹ค๊ณ  ๊ฐ€์ •ํ•ด๋ณผ๊ฒŒ์š”.

week1 ํด๋” ์•ˆ์— index.html ํŒŒ์ผ์„ ์ƒ์„ฑํ–ˆ๋‹ค๊ณ  ๊ฐ€์ •ํ•ด๋ณด์ฃ .

๋‹ค์‹œ ํ˜„์žฌ ์ƒํƒœ๋ฅผ ํ™•์ธํ•ด๋ด…์‹œ๋‹ค!

git status

image

์ถ”์ ์ค‘์ด์ง€ ์•Š์€ week1 ์ด ์žˆ๋‹ค๊ณ  ๋งํ•ด์ฃผ๊ณ  ์žˆ๋„ค์š”.

ํ•œ ๋ฒˆ ์•ผ๋ฌด์ง€๊ฒŒ ์ถ”์ ํ•ด๋ด…์‹œ๋‹ค.

git add .
๐ŸŒˆ  "." ์ด ์˜๋ฏธํ•˜๋Š” ๊ฒƒ์€ ์ „์ฒด์—์š”. 
์ถ”์  ์ค‘์ด์ง€ ์•Š์€ "๋ชจ๋“  ํŒŒ์ผ"์„ ์ถ”์ ํ•˜๊ฒ ๋‹ค๋Š” ๋œป์ด ๋˜๊ฒ ๋„ค์š”.
๐ŸŒˆ ์ด ๋‹จ๊ณ„๋ฅผ "staging area" ์— ์žˆ๋‹ค๊ณ  ํ•˜๋Š”๋ฐ์š”.
"์ปค๋ฐ‹ํ•  ์ค€๋น„๊ฐ€ ๋œ ์ƒํƒœ"๋ฅผ ์˜๋ฏธํ•ด์š”.

์ปค๋ฐ‹์„ ํ•˜๊ธฐ ์œ„ํ•ด์„œ ์šฐ๋ฆฌ๊ฐ€ ๋กœ์ปฌ์—์„œ ์ž‘์—…ํ•œ ํŒŒ์ผ๋“ค์„ staging area๋กœ ์˜ฌ๋ ค์ฃผ๋Š” ์ž‘์—…์ด ํ•„์š”ํ•ด์š”.
์ด๋ฅผ ์œ„ํ•ด์„œ `git add` ๋ช…๋ น์–ด๊ฐ€ ํ•„์š”ํ•œ๊ฑฐ๋ž๋‹ˆ๋‹ค.
๐Ÿ™‹๐Ÿปโ€โ™‚๏ธ "์—ฌ๊ธฐ์„œ ์ปค๋ฐ‹์ด๋ž€?"

์Œ ... ์ž‘์—…ํ•œ ๊ฒƒ์— ๋Œ€ํ•œ ๋ณ€๊ฒฝ์ ์„ ๊ธฐ๋กํ•œ๋‹ค! ๋Š” ์˜๋ฏธ์—์š”.

์ž‘์—…ํ™˜๊ฒฝ์˜ ํ˜„์žฌ์ƒํƒœ๋ฅผ ์‚ฌ์ง„์„ ์ฐ์–ด๋†“๋Š” ๋“ฏํ•œ ... ์Šค๋ƒ…์ƒท๊ณผ ๊ฐ™์€ ์—ญํ• ์„ ํ•œ๋‹ต๋‹ˆ๋‹ค.

ํŠน์ • ์ปค๋ฐ‹์˜ ์ƒํƒœ๋กœ ํ™˜๊ฒฝ์„ ๋Œ๋ฆด ์ˆ˜๋„ ์žˆ๊ณ .
์ปค๋ฐ‹ ๋‹จ์œ„๋กœ ์–ด๋–ค ์ž‘์—…์„ ํ–ˆ๋Š”์ง€ ํ™•์ธํ•  ์ˆ˜๋„ ์žˆ์–ด์š”.

Git์„ ์‚ฌ์šฉํ•˜๋Š”๋ฐ ์žˆ์–ด ๊ฐ€์žฅ ์ค‘์š”ํ•œ ์—ญํ• ์„ ํ•ด์š”.

๊ทธ๋ ‡๊ธฐ ๋•Œ๋ฌธ์—
"์ปค๋ฐ‹์˜ ๋‹จ์œ„"๋ฅผ ์ž˜ ๋‚˜๋ˆ„๋Š” ๊ฒƒ์ด ์ค‘์š”ํ•ด์š”!

๋ชจ๋“  ๊ณผ์ œ๋ฅผ ์™„๋ฃŒํ•  ๋•Œ๊นŒ์ง€ ํ•œ ๋ฒˆ๋„ ์ปค๋ฐ‹์„ ํ•˜์ง€ ์•Š๋‹ค๊ฐ€ ๋ชจ๋‘ ์™„์„ฑํ•˜๊ณ  ์ปค๋ฐ‹์„ ํ•œ๋‹ค๋ฉด?

์ž‘์—…ํ™˜๊ฒฝ์˜ ๊ธฐ๋ก์€ ๋”ฑ ๋‘๊ฐ€์ง€๋กœ ๋‚˜๋‰˜๊ฒ ์ฃ .
๊ณผ์ œ๋ฅผ ์™„์„ฑํ•˜๊ธฐ ์ „๊ณผ ํ›„! 

์ปค๋ฐ‹ ๋‹จ์œ„๋ฅผ ์ž˜ ๋‚˜๋ˆ„๋Š” ์Šต๊ด€์„ ๋“ค์—ฌ๋ด…์‹œ๋‹ค ์šฐ๋ฆฌ!

๊ทธ๋Ÿผ ํ•œ ๋ฒˆ ์ปค๋ฐ‹์„ ์ž‘์„ฑํ•ด๋ด…์‹œ๋‹ค.

git commit -m "์ปค๋ฐ‹ ๋ฉ”์‹œ์ง€๋ฅผ ์—ฌ๊ธฐ์— ์ž…๋ ฅํ•˜์„ธ์š”."
๐ŸŒˆ  ์ปค๋ฐ‹ ๋ฉ”์‹œ์ง€๋Š” ์•„๋ฌด๋ ‡๊ฒŒ๋‚˜ ์ž…๋ ฅํ•ด๋„ ๋˜์ง€๋งŒ...
โŒโŒโŒโŒ ์•„๋ฌด๋ ‡๊ฒŒ๋‚˜ ์ž…๋ ฅํ•˜๋ฉด ์•ˆ๋ฉ๋‹ˆ๋‹ค! kk โŒโŒโŒโŒ

"๋‚ด๊ฐ€ ๋ฌด์Šจ ์ž‘์—…์„ ํ–ˆ๋Š” ์ง€"๋ฅผ ์•Œ์•„๋ณผ ์ˆ˜ ์žˆ๋„๋ก ์ž‘์„ฑํ•˜๋Š”๊ฒŒ ์ข‹์•„์š”.
์ด๋Ÿฐ ์ปค๋ฐ‹์˜ ๋ฃฐ์„ ํŒ€๋ผ๋ฆฌ ์ •ํ•˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ์žˆ๋Š”๋ฐ ์ด๋ฅผ `์ปค๋ฐ‹ ์ปจ๋ฒค์…˜` ์ด๋ผ๊ณ  ํ•ด์š”.

์ดํ›„ ํ•ฉ๋™ ์„ธ๋ฏธ๋‚˜๋‚˜, ์†์ปคํ†ค, ์•ฑ์žผ ๋“ฑ์—์„œ ํŒ€๋งˆ๋‹ค์˜ ์ปจ๋ฒค์…˜์„ ์ •ํ•˜๊ณ  ์ง„ํ–‰ํ•˜๊ฒŒ ๋  ๊ฒƒ์ด์—์š”

๊ทธ๊ฑด ๊ทธ๋ ‡๊ณ , ์ปค๋ฐ‹์ด ์„ฑ๊ณต์ ์œผ๋กœ ์™„๋ฃŒ๋˜์—ˆ๊ณ  ๋” ์ด์ƒ ์ปค๋ฐ‹ํ•  ๊ฒƒ์ด ์—†๋‹ค๊ณ  ๋งํ•ด์ฃผ๊ณ  ์žˆ๋„ค์š”.

image

9๏ธโƒฃ ๋กœ์ปฌ ์ปค๋ฐ‹์„ Github๋กœ Pushํ•˜๊ธฐ

๋งˆ์ง€๋ง‰ ๋‹จ๊ณ„๊นŒ์ง€ ์™”๋„ค์š”.

์ปค๋ฐ‹์€ ์„ฑ๊ณต์ ์œผ๋กœ ์™„๋ฃŒํ–ˆ์ง€๋งŒ ์ด๋Š” ์•„์ง Github์—๋Š” ๋ฐ˜์˜๋˜์ง€ ์•Š์•˜์„๊ฑฐ์—์š”.

์•„์ง ๋‚ด ์ž‘์—…ํ™˜๊ฒฝ์— ๋Œ€ํ•œ ์Šค๋ƒ…์ƒท์„ ๊ฐ€์ง€๊ณ  ์žˆ์„ ๋ฟ ์ด๋ฅผ ๊นƒํ—ˆ๋ธŒ์— ๋ณด๋‚ด์ง€ ์•Š์€ ์ƒํƒœ! ๋ผ๊ณ  ์ดํ•ดํ•˜์‹œ๋ฉด ๋˜๊ฒ ๋„ค์š”.

์ด์ œ ์ด๋ฅผ ๋‹ค๋ฅธ ์‚ฌ๋žŒ๋„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋„๋ก Push ํ•˜๋Š” ์ž‘์—…์„ ํ•ด๋ณผ๊ฒŒ์š”.

๋‹ค์Œ์˜ ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•ด๋ณด์•„์š”.

git push origin week1

origin์ด๋ผ๋Š” ์ด๋ฆ„์„ ๊ฐ–๋Š” remote ์ €์žฅ์†Œ์— week1 ๋ธŒ๋žœ์น˜์—์„œ ์ž‘์—…ํ•œ ๋ณ€๊ฒฝ์ ์„ ๋ณด๋‚ด๊ฒ ๋‹ค ๋ผ๋Š” ์˜๋ฏธ๊ฐ€ ๋˜๊ฒ ๋„ค์š”.

image

์„ฑ๊ณต์ ์œผ๋กœ push๊ฐ€ ์™„๋ฃŒ๋˜์—ˆ๋‹ค๋ฉด Github ์ƒ์—์„œ ๋‚ด๊ฐ€ ์ž‘์—…ํ•œ ๋ณ€๊ฒฝ์ ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋  ๊ฑฐ์—์š”!


์ „์ฒด์ ์ธ ๊ทธ๋ฆผ์€ ๋‹ค์Œ๊ณผ ๊ฐ™์•„์š”

image

About

๐Ÿงฉ ๊ณผ์ œ๋ฅผ ๊นƒํ—ˆ๋ธŒ์— Push ํ•˜๋Š” ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published