Pyon's Diary


舊 令和元年己亥卯月拾壹日 (水・晴)

メディアクエリでのrem

メディアクエリでの rem はルート要素のフォントサイズではなくブラウザで設定されたフォントサイズを元にしているとの事。

此まで html 要素で以下のやうに設定したが,

html {
  font-size: 62.5%; /* font-size 1em = 10px on default browser settings */
}

html で基準のフォントサイズを設定するのを止めて,ブラウザで設定しているフォントサイズを基準にするやうにした.

コミットの分割

この記事の通りにしたら出來た.

コミットのAuthor及びCommiterの變更

此の方法だとAuthorのみでCommiterが變更されないので下記の記事を參考にした.

以下のやうなスクリプトを作つて實行した.

#!/bin/bash

git filter-branch --commit-filter '
if [ "$GIT_AUTHOR_EMAIL" = "<變更前のメールアドレス>" ];
then
    GIT_AUTHOR_NAME="<變更後のユーザ名";
    GIT_AUTHOR_EMAIL="<變更後のメールアドレス>";
    GIT_COMMITTER_NAME="<變更前のユーザ名>"
    GIT_COMMITTER_EMAIL="<變更後のメールアドレス>"
    git commit-tree "$@";
else
    git commit-tree "$@";
fi' HEAD

以下が實行結果.

% /bin/bash ../change-author-and-commiter.sh
Rewrite 4bce699afaa641efb6998bc923fade14fb6ff4d0 (1/424) (0 seconds passed, ...
Rewrite 81f400acc9d7101ff7fbbdf6f151c3d82462cf49 (2/424) (0 seconds passed, ...
Rewrite f3064acaa15bbb1a84babdc9a13eaf167a8f7ad0 (3/424) (0 seconds passed, ...
(省略)
Rewrite 10421cd09d2c2a0221fecc76d95da71b41af0d51 (418/424) (66 seconds passed, ...
Rewrite c124daf4523a380c5d84e54036613adfdbc1947e (418/424) (66 seconds passed, remaining 0 predicted)
Ref 'refs/heads/master' was rewritten

實行後に git log --pretty=fullAuthorCommiter が變更されてゐる事を確認.其乃後GitHubにpushした.

但し,再度別のユーザ名を變更しやうとすると git commit-treemissing といふエラーを出してきた.

(前略)
Rewrite f19b500761d3ec4d53c67d67a56cfb1345c68a1c (257/427) (37 seconds passed, remaining 24 predicted)    git commit-tree: 51: [: missing ]
Rewrite ba21e8e778e40640fc57ba730a17223035d2ec15 (264/427) (38 seconds passed, remaining 23 predicted)    git commit-tree: 51: [: missing ]
Rewrite c327a1ac8bc4420bfb519409a16455bb9526f055 (264/427) (38 seconds passed, remaining 23 predicted)    git commit-tree: 51: [: missing ]
(後略)

git-filter-branch(1)マニュアルに以下の記述が在つた.

WARNING! The rewritten history will have different object names for all the objects and will not converge with the original branch. You will not be able to easily push and distribute the rewritten branch on top of the original branch. Please do not use this command if you do not know the full implications, and avoid using it anyway, if a simple single commit would suffice to fix your problem. (See the “RECOVERING FROM UPSTREAM REBASE” section in git-rebase(1) for further information about rewriting published history.)

既にpush濟のリポジトリに對しては git-rebase(1) (マニュアル)を使つた方が安全だといふ事なので,バックアップを git push --force してリモートリポジトリを元に戻し, git rebase -i で直す事にした.

晩御飯

  • シーフードピラフ
  • キャベツと大葉のサラダ
  • 漬け置きした肉を燒いたの
  • スナップ豌豆の味噌汁
comments powered by Disqus