LoginSignup
2
0

More than 5 years have passed since last update.

フォークと本家を同期させる Git エイリアス

Last updated at Posted at 2018-01-25

毎回ググるのがツラいので、set-upstreamsync-fork というエイリアスを追加する。

~/.gitconfig
[alias]
    set-upstream = !"f() { if [ -n \"$1\" ]; then git remote add upstream $1; else echo 'usage: git set-upstream <url>' && exit 1; fi; }; f"
    sync-fork = !"git fetch upstream && git checkout master && git merge upstream/master"

GitHub Help より。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0