๐Ÿ˜ข ์Šคํ„ฐ๋””๋…ธํŠธ(Git 9~10)

zoeยท2023๋…„ 4์›” 26์ผ
0

์‹ค์Šตํ™˜๊ฒฝ ๋งŒ๋“ค๊ธฐ

  • Remote Repository ์ƒ์„ฑ

  • Remote Repository ์ฃผ์†Œ ๋ณต์‚ฌ

  • Local Repository ๋ณต์‚ฌ : git_ws ํด๋” ํ•˜์œ„

git clone https://zoe-0314:<token>@github.com/zoe-0314/tag_project.git
ls
cd tag_project

  • ํŒŒ์ผ ์ƒ์„ฑ ํ›„ commit 3๊ฐœ ๋งŒ๋“ค๊ธฐ
    ํŒŒ์ผ ์ด๋ฆ„ : hello.txt
    commit 1 : Hello, world.
    commit 2 : Hello, noma.
    commit 3 : Hello, zerobase.
cat > hello.txt
hello,world.

ctrl + d

cat hello.txt
git add hello.txt
git commit -m 'commit 1' hello.txt

cat > hello.txt
hello,noma.

ctrl + d

cat hello.txt
git add hello.txt
git commit -m 'commit 2' hello.txt

cat > hello.txt
hello,zerobase.

ctrl + d

cat hello.txt
git add hello.txt
git commit -m 'commit 3' hello.txt

  • Remote Repository ์— Push
git push origin main




Tag

  • Tag : ํŠน์ • ๋ฒ„์ „(Commit)์— Tag๋ฅผ ๋‹ฌ์•„๋†“์„ ํ•„์š”๊ฐ€ ์žˆ์„ ๋•Œ ์‚ฌ์šฉ (์˜ˆ - ๋ฒ„์ „ ๋ฆด๋ฆฌ์Šค)

  • Git Tag ์ƒ์„ฑ : ํ˜„์žฌ ๋ฒ„์ „์— Tag ๋‹ฌ๊ธฐ

git tag <tagname>

  • ์‹ค์Šต 1 (Git Tag) ํ˜„์žฌ ๋ฒ„์ „ (Commit3) ์— Tag (v0.3) ๋‹ฌ๊ธฐ
git tag v0.3
  • ์‹ค์Šต 1 (Git Tag) Tag ํ™•์ธ
git log




  • Git Tag ์ƒ์„ฑ : ํŠน์ • ๋ฒ„์ „์— Tag ๋‹ฌ๊ธฐ
git tag <tagname> <commithash>

  • ์‹ค์Šต 2 (Git Tag) ํŠน์ • ๋ฒ„์ „ (Commit2) ์— Tag (v0.2) ๋‹ฌ๊ธฐ
git tag v0.2 48ef5338404cd67aefec4281a366b9737a0f4e3f
  • ์‹ค์Šต 2 (Git Tag) Tag ํ™•์ธ
git log




  • Git Tag ์ƒ์„ฑ : Tag๋ฅผ Remot Repository์— Push
git push origin <tagname>

  • ์‹ค์Šต 3 (Git Tag) Tag ๋ฅผ Remote Repository ์— Push
git push origin v0.3
  • ์‹ค์Šต 3 (Git Tag) Tag ์ •๋ณด ํ™•์ธ




  • Git Tag ๋ชฉ๋ก ๋ณด๊ธฐ
git tag

  • ์‹ค์Šต 1 (Git Tag ๋ชฉ๋ก ๋ณด๊ธฐ) Git Tag ๋ชฉ๋ก ๋ณด๊ธฐ ์‹ค์Šต
git tag




  • Git Tag ์ƒ์„ธ ์ •๋ณด
git show <tagname>

  • ์‹ค์Šต 1 (Git Tag ์ƒ์„ธ ์ •๋ณด) Git Tag ์ƒ์„ธ ์ •๋ณด
git show v0.3
git show v0.2




  • Git Tag ์‚ญ์ œ
git tag --delete <tagname>

  • ์‹ค์Šต 1 (Git Tag ์‚ญ์ œ)
git tag --delete v0.3
git tag




  • Git Tag ์‚ญ์ œ
git push --delete origin <tagname>

  • ์‹ค์Šต 2 (Git Tag ์‚ญ์ œ)
git push --delete origin v0.3

1. tag_project ์˜ ๋ชจ๋“  tag ์‚ญ์ œ

git tag --delete v0.2

2. tag_project ์— tag ๋‹ฌ๊ณ  tag ๋ชฉ๋ก ๋ฐ ์ƒ์„ธ์ •๋ณด ํ™•์ธ

  • commit1 : v0.1
  • commit2 : v0.2
  • commit3 : v0.3
git tag v0.3
git tag v0.2 48ef5338404cd67aefec4281a366b9737a0f4e3f
git tag v0.1 0e25a994b78fae0b11bd6c113d2f7e325a0cf419

3. Git Tag ์ „๋ถ€ Remote Repository ์— Push ํ•˜๊ณ  ํ™•์ธ

 git push origin v0.1
 git push origin v0.2
 git push origin v0.3

4. V0.1 Tag Local + Remote ์—์„œ ์ง€์šฐ๊ณ  ํ™•์ธ

git push --delete origin v0.1
git tag --delete v0.1

5. V0.2 Tag Local + Remote ์—์„œ ์ง€์šฐ๊ณ  ํ™•์ธ

git push --delete origin v0.2
git tag --delete v0.2

6. V0.3 Tag Local + Remote ์—์„œ ์ง€์šฐ๊ณ  ํ™•์ธ

git push --delete origin v0.3
git tag --delete v0.3




README

  • README :
    ํ”„๋กœ์ ํŠธ์— ๋Œ€ํ•œ ์„ค๋ช…, ์‚ฌ์šฉ๋ฐฉ๋ฒ•, ๋ผ์ด์„ผ์Šค, ์„ค์น˜๋ฒ•๊ณผ ๊ฐ™์€ ๋ถ€๋ถ„์— ๋Œ€ํ•ด ๊ธฐ์ˆ ํ•˜๋Š” ํŒŒ์ผ
    ๋‚˜, ์ง์žฅ๋™๋ฃŒ, ํ”„๋กœ๊ทธ๋žจ ์‚ฌ์šฉ์ž๋ฅผ ์œ„ํ•ด ์กด์žฌ

  • README ์˜ˆ์ œ




Markdown

  • ์‹ค์Šต (Markdown) GitHub ์—์„œ README ํŒŒ์ผ ์ˆ˜์ •์„ ์„ ํƒ

  • ์‹ค์Šต (Markdown) ํŒŒ์ผ ์ˆ˜์ • ํ›„ Commit


  • Headers - ํฐ ์ œ๋ชฉ : =====
  • Headers - ์ž‘์€ ์ œ๋ชฉ : -----
  • Headers - ๊ธ€๋จธ๋ฆฌ : 1~6๊นŒ์ง€ ์ง€์›
# This is H1
## This is H2
### This is H3
#### This is H4
##### This is H5
###### This is H6
  • BlockQuote : ๋ธ”๋Ÿญ ์ธ์šฉ๋ฌธ์ž ์‚ฌ์šฉ(>)
> This is a first blockqute
>> This is a second blockqute
>>> This is a third blockqute

This is a first blockqute

This is a second blockqute

This is a third blockqute

  • BlockQuote (ํ˜ผํ•ฉ) : ๋ธ”๋Ÿญ ๋‚ด์—์„œ ๋‹ค๋ฅธ Markdown ์š”์†Œ๋ฅผ ํฌํ•จํ•  ์ˆ˜ ์žˆ์Œ
> ### This is H3
> * List
>

This is H3

  • List
  • ๋ชฉ๋ก - ์ˆœ์„œ๊ฐ€ ์žˆ๋Š” ๋ชฉ๋ก : ๋‚ด๋ฆผ์ฐจ์ˆœ์œผ๋กœ ์ž๋™ ์ •๋ ฌ๋จ
1. ์ฒซ๋ฒˆ์งธ
2. ๋‘๋ฒˆ์งธ
3. ์„ธ๋ฒˆ์งธ
  1. ์ฒซ๋ฒˆ์งธ
  2. ๋‘๋ฒˆ์งธ
  3. ์„ธ๋ฒˆ์งธ
  • ๋ชฉ๋ก - ์ˆœ์„œ๊ฐ€ ์—†๋Š” ๋ชฉ๋ก
* ๋นจ๊ฐ•
	* ๋…น์ƒ‰
    	* ํŒŒ๋ž‘
+ ๋นจ๊ฐ•
	+ ๋…น์ƒ‰
    	+ ํŒŒ๋ž‘
- ๋นจ๊ฐ•
	- ๋…น์ƒ‰
    	- ํŒŒ๋ž‘
  • ๋นจ๊ฐ•
    - ๋…น์ƒ‰
    - ํŒŒ๋ž‘
  • ๋ชฉ๋ก - ์ˆœ์„œ๊ฐ€ ์—†๋Š” ๋ชฉ๋ก(ํ˜ผํ•ฉ)
* 1๋‹จ๊ณ„
	- 2๋‹จ๊ณ„
    	+ 3๋‹จ๊ณ„
  • 1๋‹จ๊ณ„
    - 2๋‹จ๊ณ„
    + 3๋‹จ๊ณ„
  • ์ฝ”๋“œ๋ธ”๋Ÿญ
<pre><code>{code}</code></pre>
{code}
  • ์ฝ”๋“œ๋ธ”๋Ÿญ( )
{code}
  • ์ˆ˜ํ‰์„ 
* * *
***
*****
- - -
-----





  • ์™ธ๋ถ€๋งํฌ
link : [Google](https://goole.com, "google link")

link : Google

  • ์ž๋™์—ฐ๊ฒฐ
* ์™ธ๋ถ€๋งํฌ : <https://github.com>
* ์ด๋ฉ”์ผ๋งํฌ : <zerobase.git@gmail.com>
  • ๊ฐ•์กฐ
* *single asterisks*
* _single underscores_
* **double asterisks**
* __double underscores__
* ~~cancleline~~
  • single asterisks
  • single underscores
  • double asterisks
  • double underscores
  • cancleline
  • ์ด๋ฏธ์ง€ : ์ด๋ฏธ์ง€๊ฐ€ ์–ด๋”˜๊ฐ€ ์—…๋กœ๋“œ ๋˜์–ด ์žˆ์–ด์•ผ ํ•จ
![Alt text](/path/to/img.jpg)
![Alt text](/path/to/img.jpg "Optional title")


  • ์ด๋ฏธ์ง€(GitHub) :
    - GitHub ์ €์žฅ์†Œ์—์„œ New Issue ํด๋ฆญ
    - Text Area ์— ์ด๋ฏธ์ง€ ์—…๋กœ๋“œ(๋“œ๋ž˜๊ทธ) ํ•˜๋ฉด Markdown Link ๊ฐ€ ์ƒ์„ฑ > ๋ณต์‚ฌ
    - README ์— ๋ถ™์—ฌ๋„ฃ๊ธฐ

  • local์—๋„ ๋‚ด๋ ค๋ฐ›๊ธฐ

1. ๋‹ค์Œ๊ณผ ๊ฐ™์€ README ํŒŒ์ผ์„ ์ž‘์„ฑ(์ด๋ฏธ์ง€, ๋งํฌ ์ฃผ์†Œ๋Š” ์ž์œ )

git pull origin main
cat README.md

์ƒ์†Œํ•˜๋‹ค..์–ด๋ ต..

๐Ÿ’ป ์ถœ์ฒ˜ : ์ œ๋กœ๋ฒ ์ด์Šค ๋ฐ์ดํ„ฐ ์ทจ์—… ์Šค์ฟจ

profile
#๋ฐ์ดํ„ฐ๋ถ„์„ #ํผํฌ๋จผ์Šค๋งˆ์ผ€ํŒ… #๋ฐ์ดํ„ฐ #๋””์ง€ํ„ธ๋งˆ์ผ€ํŒ…

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