Skip to content

Commit

Permalink
Rename and update Markdown files based on h1 titles
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Aug 28, 2024
1 parent ac2e22c commit 58421bc
Show file tree
Hide file tree
Showing 144 changed files with 113 additions and 113 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Github Action ๋งํฌ ๋ชจ์Œ

{% embed url="https://docs.github.com/ko/actions" %}
2 changes: 0 additions & 2 deletions developLog/ci-cd/github-action/README.md

This file was deleted.

3 changes: 1 addition & 2 deletions developLog/ci-cd/github-action/github-action.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# Github Action ๋งํฌ ๋ชจ์Œ
# github-action

{% embed url="https://docs.github.com/ko/actions" %}
26 changes: 0 additions & 26 deletions developLog/ci-cd/github/README.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
description: github ์ž์ฃผ ์“ฐ๋Š” ๋ช…๋ น์–ด ๋ชจ์•„๋ณด๊ธฐ
icon: git
layout:
title:
visible: true
description:
visible: true
tableOfContents:
visible: true
outline:
visible: true
pagination:
visible: false
---

# github ์ž์ฃผ ์“ฐ๋Š” ๋ช…๋ น์–ด

## 1. ๋กœ์ปฌ ์ €์žฅ์†Œ์™€ ์›๊ฒฉ ์ €์žฅ์†Œ ๋งž์ถ”๊ธฐ

> `git reset --hard` ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํŠน์ • ์ปค๋ฐ‹์œผ๋กœ ๋˜๋Œ๋ ธ์„ ๋•Œ, ๋กœ์ปฌ ์ €์žฅ์†Œ๋Š” ๊ทธ ์ปค๋ฐ‹ ์ดํ›„์˜ ๋ชจ๋“  ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ์žƒ๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. ์ด๋•Œ ๋กœ์ปฌ ์ €์žฅ์†Œ์™€ ์›๊ฒฉ ์ €์žฅ์†Œ์˜ ์ƒํƒœ๊ฐ€ ๋ถˆ์ผ์น˜ํ•˜๊ฒŒ ๋˜๋ฉฐ, ์ด๋ฅผ ๋งž์ถ”๊ธฐ ์œ„ํ•ด ๊ฐ•์ œ๋กœ ํ‘ธ์‹œํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
1. **`git reset --hard` ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํŠน์ • ์ปค๋ฐ‹์œผ๋กœ ๋˜๋Œ๋ฆผ**

์ด๋ฏธ ์‹คํ–‰ํ•œ ๋ช…๋ น์–ด์ž…๋‹ˆ๋‹ค:

```bash
git reset --hard 6bec4114ed3cfd83858aa59311ca0ac9813d6c18
```

์ด ๋ช…๋ น์–ด๋Š” ๋กœ์ปฌ ์ €์žฅ์†Œ๋ฅผ `6bec4114ed3cfd83858aa59311ca0ac9813d6c18` ์ปค๋ฐ‹์œผ๋กœ ๋˜๋Œ๋ฆฝ๋‹ˆ๋‹ค.
2. **์›๊ฒฉ ์ €์žฅ์†Œ์— ๊ฐ•์ œ๋กœ ํ‘ธ์‹œ**

๋กœ์ปฌ ์ €์žฅ์†Œ๋ฅผ ์›๊ฒฉ ์ €์žฅ์†Œ์™€ ๋งž์ถ”๊ธฐ ์œ„ํ•ด ๊ฐ•์ œ๋กœ ํ‘ธ์‹œํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์ด๋Š” ์›๊ฒฉ ์ €์žฅ์†Œ์˜ ํžˆ์Šคํ† ๋ฆฌ๋ฅผ ๋ฎ์–ด์“ฐ๋Š” ๊ฒƒ์ด๋ฏ€๋กœ ์ฃผ์˜๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

```bash
git push origin main --force
```

์—ฌ๊ธฐ์„œ `main`์€ ํ˜„์žฌ ์‚ฌ์šฉ ์ค‘์ธ ๋ธŒ๋žœ์น˜ ์ด๋ฆ„์ž…๋‹ˆ๋‹ค. ๋งŒ์•ฝ ๋‹ค๋ฅธ ๋ธŒ๋žœ์น˜๋ฅผ ์‚ฌ์šฉ ์ค‘์ด๋ผ๋ฉด ํ•ด๋‹น ๋ธŒ๋žœ์น˜ ์ด๋ฆ„์„ ์‚ฌ์šฉํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

### ์ฃผ์˜์‚ฌํ•ญ

* **๊ฐ•์ œ ํ‘ธ์‹œ (`--force`)**: ์›๊ฒฉ ์ €์žฅ์†Œ์˜ ํžˆ์Šคํ† ๋ฆฌ๊ฐ€ ๋ฎ์–ด์จ์ง€๊ธฐ ๋•Œ๋ฌธ์—, ์ด ์ž‘์—…์€ ์‹ ์ค‘ํ•˜๊ฒŒ ์ˆ˜ํ–‰ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ํŠนํžˆ ๋‹ค๋ฅธ ์‚ฌ๋žŒ๋“ค์ด ์ด ์ €์žฅ์†Œ๋ฅผ ์‚ฌ์šฉ ์ค‘์ด๋ผ๋ฉด, ๊ทธ๋“ค์—๊ฒŒ ์˜ํ–ฅ์„ ๋ฏธ์น  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
* **ํžˆ์Šคํ† ๋ฆฌ ์†์‹ค**: ์ด ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•˜๋ฉด ๋˜๋Œ๋ฆฐ ์ดํ›„์˜ ๋ชจ๋“  ์ปค๋ฐ‹์ด ํžˆ์Šคํ† ๋ฆฌ์—์„œ ์‚ฌ๋ผ์ง€๋ฏ€๋กœ, ํ•„์š”ํ•  ๊ฒฝ์šฐ ๋ฐฑ์—…์„ ๊ณ ๋ คํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

### ์ „์ฒด์ ์ธ ์ ˆ์ฐจ ์š”์•ฝ

1. **๋กœ์ปฌ ์ปค๋ฐ‹ ๋˜๋Œ๋ฆฌ๊ธฐ**: `git reset --hard <commit-hash>`
2. **์›๊ฒฉ ์ €์žฅ์†Œ์— ๊ฐ•์ œ ํ‘ธ์‹œ**: `git push origin <branch-name> --force`

์ด ์ž‘์—…์„ ํ†ตํ•ด ๋กœ์ปฌ๊ณผ ์›๊ฒฉ ์ €์žฅ์†Œ์˜ ์ƒํƒœ๋ฅผ ์ผ์น˜์‹œํ‚ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.



## 2. Forkํ•œ ๋ ˆํฌ์ง€ํ† ๋ฆฌ commit ๊ธฐ๋ก ๋‚จ๊ธฐ๊ธฐ ์œ„ํ•œ ์ž‘์—…

> ์ฐธ๊ณ  : [https://soranhan.tistory.com/11](https://soranhan.tistory.com/11)

1. **์ผ๋‹จ ๋‚ด github์— ์ƒˆ๋กœ์šด ๋ ˆํŒŒ์ง€ํ† ๋ฆฌ๋ฅผ ๋งŒ๋“ ๋‹ค.**
2. **terminal์„ ์—ฐ๋‹ค.**
3. **๋ณต์‚ฌํ•˜๊ณ ์ž ํ•˜๋Š” repository๋ฅผ bare cloneํ•œ๋‹ค.**

```
$ git clone --bare https://github.com/exampleuser/old-repository.git
```
4. **์ƒˆ๋กœ์šด ๋ ˆํŒŒ์ง€ํ† ๋ฆฌ๋กœ Mirror-push**
```
$ cd old-repository.git
$ git push --mirror https://github.com/exampleuser/new-repository.git
```
5. **์ฒ˜์Œ์— ์ž„์‹œ๋กœ ์ƒ์„ฑํ–ˆ๋˜ local repository๋ฅผ ์‚ญ์ œ**
```
$ cd ..
$ rm -rf old-repository.git
```
6. ๋‹ค๋งŒ ์ด๊ฒŒ ๊ฐ€๋” ์•ˆ๋˜๋Š” ๊ฒŒ ์žˆ๋Š”๋ฐ ๊ทธ ์ด์œ ๋Š” `๊ถŒํ•œ` ๋•Œ๋ฌธ์ด๊ธฐ์— ํ† ํฐ์„ ๋งŒ๋“ค์–ด์ฃผ๊ณ  ๊ทธ๊ฑธ๋กœ ์‚ฌ์šฉํ•ด์•ผ ํ•จ
> GitHub Personal Access Token ์ƒ์„ฑ
>
> 1. GitHub ๊ณ„์ •์œผ๋กœ ๋กœ๊ทธ์ธํ•ฉ๋‹ˆ๋‹ค.
> 2. [GitHub์˜ Personal Access Token ์ƒ์„ฑ ํŽ˜์ด์ง€](https://github.com/settings/tokens)๋กœ ์ด๋™ํ•ฉ๋‹ˆ๋‹ค.
> 3. "Generate new token" ๋ฒ„ํŠผ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.
> 4. **๊ถŒํ•œ(Scopes)**์—์„œ `repo`, `workflow`, `admin:repo_hook` ๊ถŒํ•œ์„ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค. ์ด ํ† ํฐ์€ ์ €์žฅ์†Œ์— ๋Œ€ํ•œ ์ฝ๊ธฐ/์“ฐ๊ธฐ ๊ถŒํ•œ์„ ๊ฐ€์ง‘๋‹ˆ๋‹ค.
> 5. ์ƒ์„ฑ๋œ ํ† ํฐ์„ ๋ณต์‚ฌํ•ด๋‘ก๋‹ˆ๋‹ค. ์ด ํ† ํฐ์€ ๋‚˜์ค‘์— ์‚ฌ์šฉํ•  ๊ฒƒ์ž…๋‹ˆ๋‹ค.
> 6. ๊ฐœ์ธ์ž˜ํŽ˜์ด์ง€์— ํ† ํฐ๊ธฐ๋กํ•ด๋‘๊ธฐ!!!
* Personal Access Token (PAT) ์‚ฌ์šฉ : `git push --mirror` ๋ช…๋ น์–ด์— Personal Access Token์„ ํฌํ•จํ•˜์—ฌ ์ธ์ฆ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
```
git push --mirror https://<TOKEN>@github.com/exampleuser/new-repository.git
```
94 changes: 11 additions & 83 deletions developLog/ci-cd/github/github.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
---
description: github ์ž์ฃผ ์“ฐ๋Š” ๋ช…๋ น์–ด ๋ชจ์•„๋ณด๊ธฐ
icon: git
icon: github
description: github ๊ด€๋ จ
cover: >-
../../.gitbook/assets/DALLยทE 2024-08-12 14.45.06 - A cute, horizontal banner
designed for a GitHub page. The banner features the GitHub logo (Octocat) in a
playful and adorable style, with elements lik.webp
coverY: -64
layout:
cover:
visible: true
size: hero
title:
visible: true
description:
Expand All @@ -14,85 +22,5 @@ layout:
visible: false
---

# github ์ž์ฃผ ์“ฐ๋Š” ๋ช…๋ น์–ด

## 1. ๋กœ์ปฌ ์ €์žฅ์†Œ์™€ ์›๊ฒฉ ์ €์žฅ์†Œ ๋งž์ถ”๊ธฐ

> `git reset --hard` ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํŠน์ • ์ปค๋ฐ‹์œผ๋กœ ๋˜๋Œ๋ ธ์„ ๋•Œ, ๋กœ์ปฌ ์ €์žฅ์†Œ๋Š” ๊ทธ ์ปค๋ฐ‹ ์ดํ›„์˜ ๋ชจ๋“  ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ์žƒ๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. ์ด๋•Œ ๋กœ์ปฌ ์ €์žฅ์†Œ์™€ ์›๊ฒฉ ์ €์žฅ์†Œ์˜ ์ƒํƒœ๊ฐ€ ๋ถˆ์ผ์น˜ํ•˜๊ฒŒ ๋˜๋ฉฐ, ์ด๋ฅผ ๋งž์ถ”๊ธฐ ์œ„ํ•ด ๊ฐ•์ œ๋กœ ํ‘ธ์‹œํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.
1. **`git reset --hard` ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํŠน์ • ์ปค๋ฐ‹์œผ๋กœ ๋˜๋Œ๋ฆผ**

์ด๋ฏธ ์‹คํ–‰ํ•œ ๋ช…๋ น์–ด์ž…๋‹ˆ๋‹ค:

```bash
git reset --hard 6bec4114ed3cfd83858aa59311ca0ac9813d6c18
```

์ด ๋ช…๋ น์–ด๋Š” ๋กœ์ปฌ ์ €์žฅ์†Œ๋ฅผ `6bec4114ed3cfd83858aa59311ca0ac9813d6c18` ์ปค๋ฐ‹์œผ๋กœ ๋˜๋Œ๋ฆฝ๋‹ˆ๋‹ค.
2. **์›๊ฒฉ ์ €์žฅ์†Œ์— ๊ฐ•์ œ๋กœ ํ‘ธ์‹œ**

๋กœ์ปฌ ์ €์žฅ์†Œ๋ฅผ ์›๊ฒฉ ์ €์žฅ์†Œ์™€ ๋งž์ถ”๊ธฐ ์œ„ํ•ด ๊ฐ•์ œ๋กœ ํ‘ธ์‹œํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ์ด๋Š” ์›๊ฒฉ ์ €์žฅ์†Œ์˜ ํžˆ์Šคํ† ๋ฆฌ๋ฅผ ๋ฎ์–ด์“ฐ๋Š” ๊ฒƒ์ด๋ฏ€๋กœ ์ฃผ์˜๊ฐ€ ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.

```bash
git push origin main --force
```

์—ฌ๊ธฐ์„œ `main`์€ ํ˜„์žฌ ์‚ฌ์šฉ ์ค‘์ธ ๋ธŒ๋žœ์น˜ ์ด๋ฆ„์ž…๋‹ˆ๋‹ค. ๋งŒ์•ฝ ๋‹ค๋ฅธ ๋ธŒ๋žœ์น˜๋ฅผ ์‚ฌ์šฉ ์ค‘์ด๋ผ๋ฉด ํ•ด๋‹น ๋ธŒ๋žœ์น˜ ์ด๋ฆ„์„ ์‚ฌ์šฉํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

### ์ฃผ์˜์‚ฌํ•ญ

* **๊ฐ•์ œ ํ‘ธ์‹œ (`--force`)**: ์›๊ฒฉ ์ €์žฅ์†Œ์˜ ํžˆ์Šคํ† ๋ฆฌ๊ฐ€ ๋ฎ์–ด์จ์ง€๊ธฐ ๋•Œ๋ฌธ์—, ์ด ์ž‘์—…์€ ์‹ ์ค‘ํ•˜๊ฒŒ ์ˆ˜ํ–‰ํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ํŠนํžˆ ๋‹ค๋ฅธ ์‚ฌ๋žŒ๋“ค์ด ์ด ์ €์žฅ์†Œ๋ฅผ ์‚ฌ์šฉ ์ค‘์ด๋ผ๋ฉด, ๊ทธ๋“ค์—๊ฒŒ ์˜ํ–ฅ์„ ๋ฏธ์น  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
* **ํžˆ์Šคํ† ๋ฆฌ ์†์‹ค**: ์ด ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•˜๋ฉด ๋˜๋Œ๋ฆฐ ์ดํ›„์˜ ๋ชจ๋“  ์ปค๋ฐ‹์ด ํžˆ์Šคํ† ๋ฆฌ์—์„œ ์‚ฌ๋ผ์ง€๋ฏ€๋กœ, ํ•„์š”ํ•  ๊ฒฝ์šฐ ๋ฐฑ์—…์„ ๊ณ ๋ คํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

### ์ „์ฒด์ ์ธ ์ ˆ์ฐจ ์š”์•ฝ

1. **๋กœ์ปฌ ์ปค๋ฐ‹ ๋˜๋Œ๋ฆฌ๊ธฐ**: `git reset --hard <commit-hash>`
2. **์›๊ฒฉ ์ €์žฅ์†Œ์— ๊ฐ•์ œ ํ‘ธ์‹œ**: `git push origin <branch-name> --force`

์ด ์ž‘์—…์„ ํ†ตํ•ด ๋กœ์ปฌ๊ณผ ์›๊ฒฉ ์ €์žฅ์†Œ์˜ ์ƒํƒœ๋ฅผ ์ผ์น˜์‹œํ‚ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.



## 2. Forkํ•œ ๋ ˆํฌ์ง€ํ† ๋ฆฌ commit ๊ธฐ๋ก ๋‚จ๊ธฐ๊ธฐ ์œ„ํ•œ ์ž‘์—…

> ์ฐธ๊ณ  : [https://soranhan.tistory.com/11](https://soranhan.tistory.com/11)

1. **์ผ๋‹จ ๋‚ด github์— ์ƒˆ๋กœ์šด ๋ ˆํŒŒ์ง€ํ† ๋ฆฌ๋ฅผ ๋งŒ๋“ ๋‹ค.**
2. **terminal์„ ์—ฐ๋‹ค.**
3. **๋ณต์‚ฌํ•˜๊ณ ์ž ํ•˜๋Š” repository๋ฅผ bare cloneํ•œ๋‹ค.**

```
$ git clone --bare https://github.com/exampleuser/old-repository.git
```
4. **์ƒˆ๋กœ์šด ๋ ˆํŒŒ์ง€ํ† ๋ฆฌ๋กœ Mirror-push**
```
$ cd old-repository.git
$ git push --mirror https://github.com/exampleuser/new-repository.git
```
5. **์ฒ˜์Œ์— ์ž„์‹œ๋กœ ์ƒ์„ฑํ–ˆ๋˜ local repository๋ฅผ ์‚ญ์ œ**
```
$ cd ..
$ rm -rf old-repository.git
```
6. ๋‹ค๋งŒ ์ด๊ฒŒ ๊ฐ€๋” ์•ˆ๋˜๋Š” ๊ฒŒ ์žˆ๋Š”๋ฐ ๊ทธ ์ด์œ ๋Š” `๊ถŒํ•œ` ๋•Œ๋ฌธ์ด๊ธฐ์— ํ† ํฐ์„ ๋งŒ๋“ค์–ด์ฃผ๊ณ  ๊ทธ๊ฑธ๋กœ ์‚ฌ์šฉํ•ด์•ผ ํ•จ
> GitHub Personal Access Token ์ƒ์„ฑ
>
> 1. GitHub ๊ณ„์ •์œผ๋กœ ๋กœ๊ทธ์ธํ•ฉ๋‹ˆ๋‹ค.
> 2. [GitHub์˜ Personal Access Token ์ƒ์„ฑ ํŽ˜์ด์ง€](https://github.com/settings/tokens)๋กœ ์ด๋™ํ•ฉ๋‹ˆ๋‹ค.
> 3. "Generate new token" ๋ฒ„ํŠผ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.
> 4. **๊ถŒํ•œ(Scopes)**์—์„œ `repo`, `workflow`, `admin:repo_hook` ๊ถŒํ•œ์„ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค. ์ด ํ† ํฐ์€ ์ €์žฅ์†Œ์— ๋Œ€ํ•œ ์ฝ๊ธฐ/์“ฐ๊ธฐ ๊ถŒํ•œ์„ ๊ฐ€์ง‘๋‹ˆ๋‹ค.
> 5. ์ƒ์„ฑ๋œ ํ† ํฐ์„ ๋ณต์‚ฌํ•ด๋‘ก๋‹ˆ๋‹ค. ์ด ํ† ํฐ์€ ๋‚˜์ค‘์— ์‚ฌ์šฉํ•  ๊ฒƒ์ž…๋‹ˆ๋‹ค.
> 6. ๊ฐœ์ธ์ž˜ํŽ˜์ด์ง€์— ํ† ํฐ๊ธฐ๋กํ•ด๋‘๊ธฐ!!!
* Personal Access Token (PAT) ์‚ฌ์šฉ : `git push --mirror` ๋ช…๋ น์–ด์— Personal Access Token์„ ํฌํ•จํ•˜์—ฌ ์ธ์ฆ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
```
git push --mirror https://<TOKEN>@github.com/exampleuser/new-repository.git
```
# github

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 58421bc

Please sign in to comment.