-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename and update Markdown files based on h1 titles
- Loading branch information
1 parent
c79fdb7
commit 10d86f6
Showing
134 changed files
with
109 additions
and
109 deletions.
There are no files selected for viewing
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.
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.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
--- | ||
icon: git | ||
description: github ์์ฃผ ์ฐ๋ ๋ช ๋ น์ด ๋ชจ์๋ณด๊ธฐ | ||
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 | ||
``` | ||
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
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.
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.