{"id":7400,"date":"2025-01-20T21:48:33","date_gmt":"2025-01-20T21:48:33","guid":{"rendered":"https:\/\/howtogeek.blog\/ja\/?p=7400"},"modified":"2025-01-20T21:48:33","modified_gmt":"2025-01-20T21:48:33","slug":"benefits-of-storing-your-linux-dotfiles-on-github","status":"publish","type":"post","link":"https:\/\/howtogeek.blog\/ja\/benefits-of-storing-your-linux-dotfiles-on-github\/","title":{"rendered":"Linux \u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u3092 GitHub \u306b\u4fdd\u5b58\u3059\u308b\u5229\u70b9"},"content":{"rendered":"<h2>Git \u3068 GitHub \u3092\u4f7f\u7528\u3057\u305f\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u7ba1\u7406\u306e\u7fd2\u5f97<\/h2>\n<h3>\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u7ba1\u7406\u3059\u308b\u7406\u7531<\/h3>\n<ul>\n<li>\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u4f7f\u7528\u3057\u3066\u30b7\u30b9\u30c6\u30e0\u69cb\u6210\u3092\u5408\u7406\u5316\u3059\u308b\u3068\u3001\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u306e\u5805\u7262\u6027\u304c\u78ba\u4fdd\u3055\u308c\u308b\u3068\u540c\u6642\u306b\u6642\u9593\u304c\u7bc0\u7d04\u3055\u308c\u307e\u3059\u3002<\/li>\n<li>Git \u306e\u3088\u3046\u306a\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0 (VCS) \u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u3055\u307e\u3056\u307e\u306a\u30c7\u30d0\u30a4\u30b9\u9593\u3067\u4e00\u8cab\u3057\u305f\u69cb\u6210\u3092\u7c21\u5358\u306b\u7dad\u6301\u3067\u304d\u307e\u3059\u3002<\/li>\n<li>\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u306e\u30db\u30b9\u30c6\u30a3\u30f3\u30b0\u306b GitHub \u3092\u6d3b\u7528\u3059\u308b\u3068\u3001\u958b\u767a\u8005\u3068\u30b7\u30b9\u30c6\u30e0\u7ba1\u7406\u8005\u9593\u306e\u5171\u6709\u3068\u30b3\u30e9\u30dc\u30ec\u30fc\u30b7\u30e7\u30f3\u304c\u4fc3\u9032\u3055\u308c\u307e\u3059\u3002<\/li>\n<\/ul>\n<p>\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u306f\u3001Linux \u74b0\u5883\u3092\u69cb\u6210\u3059\u308b\u305f\u3081\u306e\u52b9\u679c\u7684\u3067\u5f37\u529b\u306a\u65b9\u6cd5\u3067\u3059\u3002\u3057\u304b\u3057\u3001\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u52b9\u7387\u7684\u306b\u8ffd\u8de1\u3057\u3066\u518d\u5229\u7528\u3059\u308b\u65b9\u6cd5\u3092\u8003\u3048\u305f\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u304b? Git \u306e\u51fa\u756a\u3067\u3059!<\/p>\n<h2 id=\"what-are-dotfiles\">\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u3068\u306f\u4f55\u3067\u3059\u304b?<\/h2>\n<p>Linux \u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0 \u30b7\u30b9\u30c6\u30e0\u3067\u306f\u3001\u30c9\u30c3\u30c8 (.) \u3067\u59cb\u307e\u308b\u30d5\u30a1\u30a4\u30eb\u306f\u96a0\u3057\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u5206\u985e\u3055\u308c\u307e\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u3001\u3053\u308c\u3089\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u30d5\u30a1\u30a4\u30eb \u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u3084\u30b3\u30de\u30f3\u30c9 \u30e9\u30a4\u30f3\u3067\u30d5\u30a1\u30a4\u30eb\u3092\u4e00\u89a7\u8868\u793a\u3059\u308b\u3068\u304d\u306b\u8868\u793a\u3055\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>\u591a\u304f\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u3001\u96a0\u3057\u30d5\u30a1\u30a4\u30eb\u3092\u4f7f\u7528\u3057\u3066\u69cb\u6210\u8a2d\u5b9a\u3092\u4fdd\u5b58\u3057\u3001\u591a\u304f\u306e\u5834\u5408\u3001\u30db\u30fc\u30e0 \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u4fdd\u5b58\u3057\u307e\u3059\u3002\u3053\u306e\u8a2d\u8a08\u306b\u3088\u308a\u3001\u3053\u308c\u3089\u306e\u69cb\u6210\u306f\u76ee\u306b\u898b\u3048\u306a\u3044\u72b6\u614b\u3067\u4fdd\u5b58\u3055\u308c\u3001\u7c21\u5358\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u69cb\u6210\u306f\u30d7\u30ec\u30fc\u30f3 \u30c6\u30ad\u30b9\u30c8\u3067\u4fdd\u5b58\u3055\u308c\u308b\u305f\u3081\u3001\u5909\u66f4\u3084\u691c\u67fb\u306f\u7c21\u5358\u3067\u3059\u3002\u30b3\u30de\u30f3\u30c9 \u30e9\u30a4\u30f3\u306b\u306f\u3001\u30b7\u30b9\u30c6\u30e0\u306e\u69cb\u6210\u3068\u30b7\u30fc\u30e0\u30ec\u30b9\u306b\u3084\u308a\u53d6\u308a\u3059\u308b\u305f\u3081\u306e\u3055\u307e\u3056\u307e\u306a\u30c4\u30fc\u30eb\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u306e\u4e00\u822c\u7684\u306a\u4f8b\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ul>\n<li> <code>.bashrc<\/code>\u3001<code>.zshrc<\/code><\/li>\n<li> <code>.exrc<\/code><\/li>\n<li> <code>.gitconfig<\/code><\/li>\n<li> <code>.npmrc<\/code><\/li>\n<\/ul>\n<h2 id=\"how-can-git-or-github-help\">Git \u307e\u305f\u306f GitHub \u306f\u3069\u306e\u3088\u3046\u306b\u5f79\u7acb\u3061\u307e\u3059\u304b?<\/h2>\n<p>\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u306f\u975e\u5e38\u306b\u4fbf\u5229\u3067\u3059\u304c\u3001\u591a\u304f\u306e\u5834\u5408\u3001\u7279\u5b9a\u306e\u30b7\u30b9\u30c6\u30e0\u306b\u5408\u308f\u305b\u3066\u8abf\u6574\u3055\u308c\u307e\u3059\u3002\u65b0\u3057\u3044\u30de\u30b7\u30f3\u306b\u79fb\u884c\u3059\u308b\u3068\u304d\u3084\u3001\u30ea\u30e2\u30fc\u30c8 \u30b5\u30fc\u30d0\u30fc\u3092\u69cb\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3068\u304d\u306f\u3001\u3059\u3079\u3066\u3092\u65b0\u305f\u306b\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3053\u3068\u306b\u6c17\u4ed8\u304f\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>Git \u306e\u3088\u3046\u306a VCS \u3092\u5229\u7528\u3059\u308b\u3068\u3001\u3053\u306e\u9762\u5012\u306a\u30d7\u30ed\u30bb\u30b9\u3092\u6392\u9664\u3057\u3001\u7570\u306a\u308b\u30de\u30b7\u30f3\u9593\u3067\u69cb\u6210\u3092\u30b7\u30fc\u30e0\u30ec\u30b9\u306b\u518d\u5229\u7528\u3067\u304d\u307e\u3059\u3002\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u30c1\u30a7\u30c3\u30af\u30a2\u30a6\u30c8\u3059\u308b\u3060\u3051\u3067\u3001\u4f7f\u3044\u6163\u308c\u305f\u30b7\u30a7\u30eb \u30a8\u30a4\u30ea\u30a2\u30b9\u3068\u4e00\u8cab\u3057\u305f\u74b0\u5883\u304c\u5fa9\u5143\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u3055\u3089\u306b\u3001\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u3092 Git \u306b\u4fdd\u5b58\u3057\u3066\u304a\u304f\u3068\u3001\u52b9\u7387\u7684\u306a\u30d0\u30c3\u30af\u30a2\u30c3\u30d7 \u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u3068\u3057\u3066\u6a5f\u80fd\u3057\u307e\u3059\u3002\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u5c65\u6b74\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3001\u7279\u5b9a\u306e\u5909\u66f4\u3092\u3044\u3064\u3001\u306a\u305c\u884c\u3063\u305f\u304b\u3092\u628a\u63e1\u3067\u304d\u307e\u3059\u3002\u5171\u540c\u4f5c\u696d\u306e\u8a2d\u5b9a\u3067\u306f\u3001\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u5171\u6709\u3057\u3066\u3001\u3059\u3079\u3066\u306e\u30c1\u30fc\u30e0 \u30e1\u30f3\u30d0\u30fc\u304c\u7d71\u4e00\u3055\u308c\u305f\u74b0\u5883\u3092\u7dad\u6301\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u30db\u30b9\u30c8\u3059\u308b\u305f\u3081\u306e\u7b2c\u4e00\u306e\u9078\u629e\u80a2\u3068\u3057\u3066\u3001Google GitHub \u304c\u6319\u3052\u3089\u308c\u307e\u3059\u3002\u4ee3\u66ff\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306f\u5b58\u5728\u3057\u307e\u3059\u304c\u3001GitHub \u306f\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u306e\u7ba1\u7406\u3068\u5171\u6709\u3092\u624b\u9593\u3092\u304b\u3051\u305a\u306b\u884c\u3048\u308b\u30a8\u30af\u30b9\u30da\u30ea\u30a8\u30f3\u30b9\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/p>\n<h2 id=\"how-to-manage-dotfiles-with-git-and-github\">\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u7ba1\u7406\u306e\u30b9\u30c6\u30c3\u30d7\u30d0\u30a4\u30b9\u30c6\u30c3\u30d7\u30ac\u30a4\u30c9<\/h2>\n<p>Git \u3092\u4f7f\u7528\u3057\u3066\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3059\u308b\u3053\u3068\u306f\u3001\u6709\u76ca\u306a\u65b9\u6cd5\u3067\u3059\u3002\u3055\u307e\u3056\u307e\u306a\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u6700\u3082\u52b9\u679c\u7684\u306a\u30a2\u30d7\u30ed\u30fc\u30c1\u3092\u4ee5\u4e0b\u306b\u793a\u3057\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u624b\u9806\u306b\u5f93\u3046\u3053\u3068\u3067\u3001\u6700\u5c0f\u9650\u306e\u52b4\u529b\u3067\u69cb\u6210\u9593\u306e\u540c\u671f\u3092\u7dad\u6301\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3 id=\"setting-up-a-bare-repository\">\u30d9\u30a2\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u8a2d\u5b9a\u3059\u308b<\/h3>\n<p>\u30db\u30fc\u30e0 \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u6574\u7406\u3057\u3066\u4e71\u96d1\u306b\u306a\u3089\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u306b\u306f\u3001\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u306e\u7ba1\u7406\u306b\u30d9\u30a2 \u30ea\u30dd\u30b8\u30c8\u30ea\u8a2d\u5b9a\u3092\u4f7f\u7528\u3059\u308b\u306e\u304c\u6700\u9069\u3067\u3059\u3002<\/p>\n<p>\u30d9\u30a2 \u30ea\u30dd\u30b8\u30c8\u30ea\u306f\u3001\u5b9f\u969b\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8 \u30d5\u30a1\u30a4\u30eb\u306a\u3057\u3067\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u5c65\u6b74\u306b\u95a2\u3059\u308b\u3059\u3079\u3066\u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u542b\u3080\u3001\u72ec\u81ea\u306e\u30bf\u30a4\u30d7\u306e Git \u30ea\u30dd\u30b8\u30c8\u30ea\u3067\u3059\u3002\u5b9f\u969b\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8 \u30d5\u30a1\u30a4\u30eb\u306f\u4f5c\u696d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u5b58\u5728\u3067\u304d\u307e\u3059\u3002\u3053\u306e\u5206\u96e2\u306b\u3088\u308a\u3001\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u30af\u30ea\u30fc\u30f3\u306b\u7ba1\u7406\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u3001\u65b0\u3057\u3044\u6307\u5b9a\u30d5\u30a9\u30eb\u30c0\u30fc\u306b\u30d9\u30a2 \u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p> <code>mkdir $HOME\/.dotfiles &amp;&amp; git init --bare $HOME\/.dotfiles<\/code><\/p>\n<p>\u3053\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u64cd\u4f5c\u3059\u308b\u3068\u304d\u306f\u3001\u4f5c\u696d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea (\u30d5\u30a1\u30a4\u30eb\u304c\u3042\u308b\u5834\u6240) \u3068 git \u30c7\u30a3\u30ec\u30af\u30c8\u30ea (\u30ea\u30dd\u30b8\u30c8\u30ea\u60c5\u5831\u304c\u4fdd\u5b58\u3055\u308c\u3066\u3044\u308b\u5834\u6240) \u3092\u5e38\u306b\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p> <code>git --work-tree=$HOME --git-dir=$HOME\/.dotfiles. ..<\/code><\/p>\n<p>\u3053\u306e\u30d7\u30ed\u30bb\u30b9\u3092\u7c21\u7d20\u5316\u3059\u308b\u306b\u306f\u3001\u30a8\u30a4\u30ea\u30a2\u30b9\u3092\u4f5c\u6210\u3057\u3066\u3001\u3069\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304b\u3089\u3067\u3082\u7c21\u5358\u306b\u547c\u3073\u51fa\u305b\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<p> <code>alias dotfiles=\"\/usr\/bin\/git --git-dir=$HOME\/.dotfiles --work-tree=$HOME\"<\/code><\/p>\n<h3 id=\"tracking-your-dotfiles\">\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u306e\u8ffd\u8de1\u3092\u958b\u59cb\u3059\u308b<\/h3>\n<p>\u3053\u308c\u3067\u3001\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u305f\u3068\u3048\u3070\u3001\u3092\u7ba1\u7406\u3059\u308b\u306b\u306f<code>.bashrc<\/code>\u3001\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<p> <code>cd $HOME &amp;&amp; dotfiles add. bashrc &amp;&amp; dotfiles commit -m \"Added Bash configuration\"<\/code><\/p>\n<p><code>dotfiles log<\/code>dotfiles \u30a8\u30a4\u30ea\u30a2\u30b9\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u7ba1\u7406\u304c\u5bb9\u6613\u306b\u306a\u308a\u307e\u3059\u3002\u30d5\u30a1\u30a4\u30eb \u30b7\u30b9\u30c6\u30e0\u306e\u3069\u3053\u304b\u3089\u3067\u3082\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3 id=\"push-your-repository-to-github\">Dotfiles \u30ea\u30dd\u30b8\u30c8\u30ea\u3092 GitHub \u306b\u30d7\u30c3\u30b7\u30e5\u3059\u308b\u65b9\u6cd5<\/h3>\n<p>\u30ea\u30dd\u30b8\u30c8\u30ea\u3092 GitHub \u3067\u30db\u30b9\u30c8\u3059\u308b\u3068\u3001\u7279\u306b\u30ea\u30e2\u30fc\u30c8\u3067\u4f5c\u696d\u3059\u308b\u5834\u5408\u306b\u3001\u30a2\u30af\u30bb\u30b7\u30d3\u30ea\u30c6\u30a3\u3068\u5171\u6709\u304c\u5411\u4e0a\u3057\u307e\u3059\u3002\u624b\u9806\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ol>\n<li><a href=\"https:\/\/github.com\/new\" rel=\"noopener noreferrer nofollow\" target=\"_blank\">\u300c\u65b0\u3057\u3044\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u4f5c\u6210\u300d\u30da\u30fc\u30b8<\/a>\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/li>\n<li>\u4e00\u610f\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u540d\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>\u30d1\u30d6\u30ea\u30c3\u30af \u30ea\u30dd\u30b8\u30c8\u30ea\u307e\u305f\u306f\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8 \u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u9078\u629e\u3057\u307e\u3059 (\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u4e0a\u306e\u7406\u7531\u304b\u3089\u3001\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u304c\u63a8\u5968\u3055\u308c\u308b\u3053\u3068\u304c\u591a\u3044\u3067\u3059)\u3002<\/li>\n<li>\u300c\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u4f5c\u6210\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/li>\n<\/ol>\n<p>\u753b\u9762\u4e0a\u306e\u6307\u793a\u306b\u5f93\u3063\u3066\u3001\u65e2\u5b58\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u3092 GitHub \u306b\u63a5\u7d9a\u3057\u307e\u3059\u3002<\/p>\n<p> <code>dotfiles remote add origin https:\/\/github.com\/<user>\/<repo>.git &amp;&amp; dotfiles push -u origin main<\/repo><\/user><\/code><\/p>\n<p>\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u5185\u306e\u6a5f\u5bc6\u60c5\u5831\u306b\u306f\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u6a5f\u5bc6\u30c7\u30fc\u30bf\u3092\u542b\u3080\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30df\u30c3\u30c8\u3059\u308b\u3053\u3068\u306f\u907f\u3051\u3001\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8 \u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h3 id=\"using-dotfiles-on-another-system\">\u65b0\u3057\u3044\u30b7\u30b9\u30c6\u30e0\u306b\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u9069\u7528\u3059\u308b<\/h3>\n<p>\u5225\u306e\u30b7\u30b9\u30c6\u30e0\u3067\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u5229\u7528\u3059\u308b\u306b\u306f\u3001\u6b21\u306e 2 \u3064\u306e\u91cd\u8981\u306a\u624b\u9806\u3092\u5b9f\u884c\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u3001\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u30d9\u30a2\u30b3\u30d4\u30fc\u3092\u30af\u30ed\u30fc\u30f3\u3057\u307e\u3059\u3002<\/p>\n<p> <code>cd $HOME &amp;&amp; git clone --bare https:\/\/github.com\/<user>\/<repo>.git<\/repo><\/user><\/code><\/p>\n<p>\u3053\u308c\u306b\u3088\u308a\u3001\u901a\u5e38\u306f \u3068\u3044\u3046\u30e9\u30d9\u30eb\u306e\u4ed8\u3044\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059<code>.git<\/code>\u304c\u3001\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u540d\u524d\u3092\u5909\u66f4\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306b\u3001\u5148\u307b\u3069\u8a2d\u5b9a\u3057\u305f git \u30a8\u30a4\u30ea\u30a2\u30b9\u3092\u518d\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p> <code>alias dotfiles=\"\/usr\/bin\/git --git-dir=$HOME\/.dotfiles --work-tree=$HOME\"<\/code><\/p>\n<p>\u6700\u5f8c\u306b\u3001\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u3055\u308c\u305f\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u73fe\u5728\u306e\u4f5c\u696d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30c7\u30d7\u30ed\u30a4\u3057\u307e\u3059\u3002<\/p>\n<p> <code>dotfiles checkout<\/code><\/p>\n<p>\u73fe\u5728\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u4e0a\u66f8\u304d\u3059\u308b\u3053\u3068\u306b\u95a2\u3059\u308b\u8b66\u544a\u304c\u8868\u793a\u3055\u308c\u308b\u5834\u5408\u306f\u3001 \u306a\u3069\u306e\u65e2\u5b58\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u304c\u539f\u56e0\u3067\u3042\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059<code>.bashrc<\/code>\u3002\u30c1\u30a7\u30c3\u30af\u30a2\u30a6\u30c8\u3092\u518d\u5ea6\u5b9f\u884c\u3059\u308b\u524d\u306b\u3001\u3053\u308c\u3089\u3092\u524a\u9664\u3059\u308b\u304b\u3001\u540d\u524d\u3092\u5909\u66f4\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>Git \u3092\u901a\u3058\u3066\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u7ba1\u7406\u3059\u308b\u3053\u3068\u3067\u3001\u30b7\u30b9\u30c6\u30e0\u306e\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3084\u79fb\u884c\u6642\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7 \u30d7\u30ed\u30bb\u30b9\u3092\u5927\u5e45\u306b\u52b9\u7387\u5316\u3057\u3001\u5909\u66f4\u5185\u5bb9\u3092\u5b8c\u5168\u306b\u6587\u66f8\u5316\u3057\u3066\u3001\u6700\u7d42\u7684\u306b\u30d5\u30e9\u30b9\u30c8\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u89e3\u6d88\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u3088\u304f\u3042\u308b\u8cea\u554f<\/h2>\n<h3><strong>1. \u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u306b\u6a5f\u5bc6\u60c5\u5831\u3092\u4fdd\u5b58\u3059\u308b\u3068\u3069\u306e\u3088\u3046\u306a\u30ea\u30b9\u30af\u304c\u3042\u308a\u307e\u3059\u304b?<\/strong><\/h3>\n<p>\u30d1\u30b9\u30ef\u30fc\u30c9\u306a\u3069\u306e\u6a5f\u5bc6\u60c5\u5831\u3092\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u306b\u4fdd\u5b58\u3059\u308b\u3068\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u4e0a\u306e\u30ea\u30b9\u30af\u304c\u751f\u3058\u307e\u3059\u3002\u305d\u306e\u3088\u3046\u306a\u60c5\u5831\u3092\u542b\u3081\u306a\u3044\u3088\u3046\u306b\u3059\u308b\u304b\u3001\u74b0\u5883\u5909\u6570\u3084\u5916\u90e8\u306e\u79d8\u5bc6\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0\u3092\u5229\u7528\u3057\u3066\u4fdd\u8b77\u3059\u308b\u3053\u3068\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002<\/p>\n<h3><strong>2. \u6a5f\u5bc6\u30c7\u30fc\u30bf\u3092\u516c\u958b\u305b\u305a\u306b\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u4ed6\u306e\u30e6\u30fc\u30b6\u30fc\u3068\u5171\u6709\u3067\u304d\u307e\u3059\u304b?<\/strong><\/h3>\n<p>\u306f\u3044\u3001\u6a5f\u5bc6\u6027\u306e\u306a\u3044\u69cb\u6210\u7528\u306b\u5225\u306e\u30d1\u30d6\u30ea\u30c3\u30af \u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002\u500b\u4eba\u7528\u69cb\u6210\u3068\u5171\u6709\u69cb\u6210\u306e\u5225\u3005\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u7dad\u6301\u3059\u308b\u306b\u306f\u3001Git \u30b5\u30d6\u30e2\u30b8\u30e5\u30fc\u30eb\u3084\u30d6\u30e9\u30f3\u30c1\u306a\u3069\u306e\u30c4\u30fc\u30eb\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<h3><strong>3. \u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u3092\u8a2d\u5b9a\u3059\u308b\u306e\u306f\u96e3\u3057\u3044\u3067\u3059\u304b?<\/strong><\/h3>\n<p>Git \u3092\u4f7f\u7528\u3057\u3066\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u3092\u8a2d\u5b9a\u3059\u308b\u306e\u306f\u7c21\u5358\u3067\u3059\u3002\u3053\u306e\u30ac\u30a4\u30c9\u3067\u6982\u8aac\u3055\u308c\u3066\u3044\u308b\u4f53\u7cfb\u7684\u306a\u624b\u9806\u306b\u5f93\u3046\u3053\u3068\u3067\u3001\u624b\u9593\u3092\u304b\u3051\u305a\u306b\u69cb\u6210\u3092\u52b9\u7387\u7684\u306b\u7ba1\u7406\u304a\u3088\u3073\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><a class=\"xiaomi\" href=\"https:\/\/www.howtogeek.com\/why-you-should-keep-all-your-dotfiles-on-github\/\" rel=\"noopener noreferrer nofollow\" target=\"_blank\">\u51fa\u5178\u3068\u753b\u50cf<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Git \u3068 GitHub \u3092\u4f7f\u7528\u3057\u305f\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u7ba1\u7406\u306e\u7fd2\u5f97 \u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u7ba1\u7406\u3059\u308b\u7406\u7531 \u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u4f7f\u7528\u3057\u3066\u30b7\u30b9\u30c6\u30e0\u69cb\u6210\u3092\u5408\u7406\u5316\u3059\u308b\u3068\u3001\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u306e\u5805\u7262\u6027\u304c\u78ba\u4fdd\u3055\u308c\u308b\u3068\u540c\u6642\u306b\u6642\u9593\u304c\u7bc0\u7d04\u3055\u308c\u307e\u3059\u3002 Git \u306e\u3088\u3046\u306a\u30d0\u30fc\u30b8\u30e7\u30f3\u7ba1\u7406\u30b7\u30b9\u30c6\u30e0 (VCS) \u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u3055\u307e\u3056\u307e\u306a\u30c7\u30d0\u30a4\u30b9\u9593\u3067\u4e00\u8cab\u3057\u305f\u69cb\u6210\u3092\u7c21\u5358\u306b\u7dad\u6301\u3067\u304d\u307e\u3059\u3002 \u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u306e\u30db\u30b9\u30c6\u30a3\u30f3\u30b0\u306b GitHub \u3092\u6d3b\u7528\u3059\u308b\u3068\u3001\u958b\u767a\u8005\u3068\u30b7\u30b9\u30c6\u30e0\u7ba1\u7406\u8005\u9593\u306e\u5171\u6709\u3068\u30b3\u30e9\u30dc\u30ec\u30fc\u30b7\u30e7\u30f3\u304c\u4fc3\u9032\u3055\u308c\u307e\u3059\u3002 \u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u306f\u3001Linux \u74b0\u5883\u3092\u69cb\u6210\u3059\u308b\u305f\u3081\u306e\u52b9\u679c\u7684\u3067\u5f37\u529b\u306a\u65b9\u6cd5\u3067\u3059\u3002\u3057\u304b\u3057\u3001\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u52b9\u7387\u7684\u306b\u8ffd\u8de1\u3057\u3066\u518d\u5229\u7528\u3059\u308b\u65b9\u6cd5\u3092\u8003\u3048\u305f\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u304b? Git \u306e\u51fa\u756a\u3067\u3059! \u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u3068\u306f\u4f55\u3067\u3059\u304b? Linux \u30aa\u30da\u30ec\u30fc\u30c6\u30a3\u30f3\u30b0 \u30b7\u30b9\u30c6\u30e0\u3067\u306f\u3001\u30c9\u30c3\u30c8 (.) \u3067\u59cb\u307e\u308b\u30d5\u30a1\u30a4\u30eb\u306f\u96a0\u3057\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u5206\u985e\u3055\u308c\u307e\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u3001\u3053\u308c\u3089\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u30d5\u30a1\u30a4\u30eb \u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u3084\u30b3\u30de\u30f3\u30c9 \u30e9\u30a4\u30f3\u3067\u30d5\u30a1\u30a4\u30eb\u3092\u4e00\u89a7\u8868\u793a\u3059\u308b\u3068\u304d\u306b\u8868\u793a\u3055\u308c\u307e\u305b\u3093\u3002 \u591a\u304f\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u3001\u96a0\u3057\u30d5\u30a1\u30a4\u30eb\u3092\u4f7f\u7528\u3057\u3066\u69cb\u6210\u8a2d\u5b9a\u3092\u4fdd\u5b58\u3057\u3001\u591a\u304f\u306e\u5834\u5408\u3001\u30db\u30fc\u30e0 \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u4fdd\u5b58\u3057\u307e\u3059\u3002\u3053\u306e\u8a2d\u8a08\u306b\u3088\u308a\u3001\u3053\u308c\u3089\u306e\u69cb\u6210\u306f\u76ee\u306b\u898b\u3048\u306a\u3044\u72b6\u614b\u3067\u4fdd\u5b58\u3055\u308c\u3001\u7c21\u5358\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u3089\u306e\u69cb\u6210\u306f\u30d7\u30ec\u30fc\u30f3 \u30c6\u30ad\u30b9\u30c8\u3067\u4fdd\u5b58\u3055\u308c\u308b\u305f\u3081\u3001\u5909\u66f4\u3084\u691c\u67fb\u306f\u7c21\u5358\u3067\u3059\u3002\u30b3\u30de\u30f3\u30c9 \u30e9\u30a4\u30f3\u306b\u306f\u3001\u30b7\u30b9\u30c6\u30e0\u306e\u69cb\u6210\u3068\u30b7\u30fc\u30e0\u30ec\u30b9\u306b\u3084\u308a\u53d6\u308a\u3059\u308b\u305f\u3081\u306e\u3055\u307e\u3056\u307e\u306a\u30c4\u30fc\u30eb\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u306e\u4e00\u822c\u7684\u306a\u4f8b\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002 .bashrc\u3001.zshrc .exrc .gitconfig .npmrc Git \u307e\u305f\u306f GitHub \u306f\u3069\u306e\u3088\u3046\u306b\u5f79\u7acb\u3061\u307e\u3059\u304b? \u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u306f\u975e\u5e38\u306b\u4fbf\u5229\u3067\u3059\u304c\u3001\u591a\u304f\u306e\u5834\u5408\u3001\u7279\u5b9a\u306e\u30b7\u30b9\u30c6\u30e0\u306b\u5408\u308f\u305b\u3066\u8abf\u6574\u3055\u308c\u307e\u3059\u3002\u65b0\u3057\u3044\u30de\u30b7\u30f3\u306b\u79fb\u884c\u3059\u308b\u3068\u304d\u3084\u3001\u30ea\u30e2\u30fc\u30c8 \u30b5\u30fc\u30d0\u30fc\u3092\u69cb\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3068\u304d\u306f\u3001\u3059\u3079\u3066\u3092\u65b0\u305f\u306b\u8a2d\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3053\u3068\u306b\u6c17\u4ed8\u304f\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002 Git \u306e\u3088\u3046\u306a VCS \u3092\u5229\u7528\u3059\u308b\u3068\u3001\u3053\u306e\u9762\u5012\u306a\u30d7\u30ed\u30bb\u30b9\u3092\u6392\u9664\u3057\u3001\u7570\u306a\u308b\u30de\u30b7\u30f3\u9593\u3067\u69cb\u6210\u3092\u30b7\u30fc\u30e0\u30ec\u30b9\u306b\u518d\u5229\u7528\u3067\u304d\u307e\u3059\u3002\u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u30c1\u30a7\u30c3\u30af\u30a2\u30a6\u30c8\u3059\u308b\u3060\u3051\u3067\u3001\u4f7f\u3044\u6163\u308c\u305f\u30b7\u30a7\u30eb \u30a8\u30a4\u30ea\u30a2\u30b9\u3068\u4e00\u8cab\u3057\u305f\u74b0\u5883\u304c\u5fa9\u5143\u3055\u308c\u307e\u3059\u3002 \u3055\u3089\u306b\u3001\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u3092 Git \u306b\u4fdd\u5b58\u3057\u3066\u304a\u304f\u3068\u3001\u52b9\u7387\u7684\u306a\u30d0\u30c3\u30af\u30a2\u30c3\u30d7 \u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u3068\u3057\u3066\u6a5f\u80fd\u3057\u307e\u3059\u3002\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u5c65\u6b74\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3001\u7279\u5b9a\u306e\u5909\u66f4\u3092\u3044\u3064\u3001\u306a\u305c\u884c\u3063\u305f\u304b\u3092\u628a\u63e1\u3067\u304d\u307e\u3059\u3002\u5171\u540c\u4f5c\u696d\u306e\u8a2d\u5b9a\u3067\u306f\u3001\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u5171\u6709\u3057\u3066\u3001\u3059\u3079\u3066\u306e\u30c1\u30fc\u30e0 \u30e1\u30f3\u30d0\u30fc\u304c\u7d71\u4e00\u3055\u308c\u305f\u74b0\u5883\u3092\u7dad\u6301\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u30ea\u30dd\u30b8\u30c8\u30ea\u3092\u30db\u30b9\u30c8\u3059\u308b\u305f\u3081\u306e\u7b2c\u4e00\u306e\u9078\u629e\u80a2\u3068\u3057\u3066\u3001Google GitHub \u304c\u6319\u3052\u3089\u308c\u307e\u3059\u3002\u4ee3\u66ff\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306f\u5b58\u5728\u3057\u307e\u3059\u304c\u3001GitHub \u306f\u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u306e\u7ba1\u7406\u3068\u5171\u6709\u3092\u624b\u9593\u3092\u304b\u3051\u305a\u306b\u884c\u3048\u308b\u30a8\u30af\u30b9\u30da\u30ea\u30a8\u30f3\u30b9\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002 \u30c9\u30c3\u30c8\u30d5\u30a1\u30a4\u30eb\u7ba1\u7406\u306e\u30b9\u30c6\u30c3\u30d7\u30d0\u30a4\u30b9\u30c6\u30c3\u30d7\u30ac\u30a4\u30c9 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[919,205,19],"class_list":["post-7400","post","type-post","status-publish","format-standard","hentry","category-how-to","tag-github","tag-linux","tag-windows"],"acf":[],"_links":{"self":[{"href":"https:\/\/howtogeek.blog\/ja\/wp-json\/wp\/v2\/posts\/7400","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/howtogeek.blog\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/howtogeek.blog\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/howtogeek.blog\/ja\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/howtogeek.blog\/ja\/wp-json\/wp\/v2\/comments?post=7400"}],"version-history":[{"count":1,"href":"https:\/\/howtogeek.blog\/ja\/wp-json\/wp\/v2\/posts\/7400\/revisions"}],"predecessor-version":[{"id":7401,"href":"https:\/\/howtogeek.blog\/ja\/wp-json\/wp\/v2\/posts\/7400\/revisions\/7401"}],"wp:attachment":[{"href":"https:\/\/howtogeek.blog\/ja\/wp-json\/wp\/v2\/media?parent=7400"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/howtogeek.blog\/ja\/wp-json\/wp\/v2\/categories?post=7400"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/howtogeek.blog\/ja\/wp-json\/wp\/v2\/tags?post=7400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}