Skip to content

Commit 815b50b

Browse files
authored
Update
1 parent f95ab94 commit 815b50b

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

Git/memo.md

+27
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,29 @@
11
- `git switch``git restore` https://qiita.com/yukibear/items/4f88a5c0e4b1801ee952
22

3+
4+
## Forkリポジトリをオリジナルリポジトリに追従する
5+
- フォークにリモートを設定する
6+
7+
参考:https://docs.github.com/ja/github/collaborating-with-issues-and-pull-requests/configuring-a-remote-for-a-fork
8+
9+
オリジナルのリポジトリを `upstream` という名前でリモートリポジトリに追加( `remote add` )する
10+
```bash
11+
git remote add upstream [オリジナルリポジトリURL]
12+
```
13+
14+
- フォークを同期する
15+
16+
参考:https://docs.github.com/ja/github/collaborating-with-issues-and-pull-requests/syncing-a-fork
17+
18+
リモートリポジトリをフェッチ
19+
```
20+
git fetch upstream
21+
```
22+
マスターブランチをチェックアウト
23+
```
24+
git checkout master
25+
```
26+
ローカルにマージ
27+
```
28+
git merge upstream/master
29+
```

0 commit comments

Comments
 (0)