UIkitのバージョン3.0(beta)が公開されました

UIkit のバージョン3.0が公開されてしばらく経ちますが、まだbeta版ですね。

今回forkしたリポジトリを更新してみたいと思います。

これまで、forkしたリポジトリの更新を行ったことがなかったので、覚え書きとして手順を書き留めておきます。

Upstreamの追加

以下のコマンドを実行して、現在のリモートブランチを確認します。

$ git remote -v
origin	https://YOUR_NAME@github.com/technobrain/uikit.git (fetch)
origin	https://YOUR_NAME@github.com/technobrain/uikit.git (push)

forkしたブランチがありませんので、追加しましょう。

$ git remote add upstream https://github.com/uikit/uikit.git
$ git remote -v
origin	https://YOUR_NAME@github.com/technobrain/uikit.git (fetch)
origin	https://YOUR_NAME@github.com/technobrain/uikit.git (push)
upstream	https://github.com/uikit/uikit.git (fetch)
upstream	https://github.com/uikit/uikit.git (push)

追加できました。


Upstreamとの同期

続いてforkしたリポジトリをupstreamと同期します。

$ git fetch upstream
remote: Counting objects: 26752, done.
remote: Compressing objects: 100% (154/154), done.
remote: Total 26752 (delta 5663), reused 5658 (delta 5608), pack-reused 20990
Receiving objects: 100% (26752/26752), 14.44 MiB | 837.00 KiB/s, done.
Resolving deltas: 100% (19986/19986), completed with 358 local objects.
From https://github.com/uikit/uikit
 * [new branch]      develop              -> upstream/develop
 * [new branch]      feature/editor       -> upstream/feature/editor
 * [new branch]      feature/grid         -> upstream/feature/grid
 * [new branch]      feature/gridparallax -> upstream/feature/gridparallax
 * [new branch]      feature/margin       -> upstream/feature/margin
 * [new branch]      feature/offcanvas    -> upstream/feature/offcanvas
 * [new branch]      feature/parallax     -> upstream/feature/parallax
 * [new branch]      feature/sass         -> upstream/feature/sass
 * [new branch]      feature/slideshow    -> upstream/feature/slideshow
 * [new branch]      master               -> upstream/master
 * [new branch]      v2/develop           -> upstream/v2/develop
 * [new branch]      v2/dist              -> upstream/v2/dist
 * [new branch]      v2/master            -> upstream/v2/master
 * [new tag]         v2.26.3              -> v2.26.3
 * [new tag]         v3.0.0-beta.18       -> v3.0.0-beta.18
 * [new tag]         2.11.0               -> 2.11.0
    ・・・
 * [new tag]         v3.0.0-beta.9        -> v3.0.0-beta.9

うまくいったようです。


Upstreamのmasterをチェックアウト

ローカルにはmasterブランチを作成していなかったので、参考にしたサイトとは異なる手順となりますが、 upstream/masterをチェックアウトしてみます。

$ git checkout master
Note: checking out 'upstream/master'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 834388a... Merge branch 'release/v3.0.0-beta.18'

いろいろと警告のようなメッセージが出てしまいました。

masterブランチが無かったので、メッセージの通りローカルに作成します。

$ git checkout -b master
$ git branch -a
customize/tbn
* master
remotes/origin/HEAD -> origin/customize/tbn
remotes/origin/customize/tbn
remotes/origin/develop
remotes/origin/feature/custom-elements
remotes/origin/feature/font-size_on_small_media
remotes/origin/feature/merge_upstream
remotes/origin/master
remotes/origin/modal-options
remotes/upstream/develop
remotes/upstream/feature/editor
remotes/upstream/feature/grid
remotes/upstream/feature/gridparallax
remotes/upstream/feature/margin
remotes/upstream/feature/offcanvas
remotes/upstream/feature/parallax
remotes/upstream/feature/sass
remotes/upstream/feature/slideshow
remotes/upstream/master
remotes/upstream/v2/develop
remotes/upstream/v2/dist
remotes/upstream/v2/master

これで大丈夫かな・・・?

今後、バージョン3.0でテーマの作成にトライしてみようと思います。


参考サイト