Skip to content

Commit

Permalink
『forkしたrepositoryのremoteを最新化しつつローカルにpullするスクリプトを書いた』のコメント修正 (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyu08 authored Sep 4, 2024
1 parent 0206e5b commit c3a64b3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion content/posts/gh-sync-remote-and-pull/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ hideComments: false
color: ""
---

## 前提
- `gh`コマンドがインストールされていること
- デフォルトブランチにいること

## tl;dr
```bash
# forkをのremoteを更新しつつ、ローカルリポジトリを最新にする
# forkしたrepositoryのremoteを更新しつつpullする
function git-sync() {
REPO=$(git remote get-url origin | sed -E 's%.+github.com/(.*).git$%\1%')
echo "🔄 Syncing ${REPO}...\\n"
Expand Down

0 comments on commit c3a64b3

Please sign in to comment.