<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Git :: Today 'tunepolo' Leaned</title><link>https://tunepolo.github.io/til/git/index.html</link><description/><generator>Hugo</generator><language>ja-jp</language><atom:link href="https://tunepolo.github.io/til/git/index.xml" rel="self" type="application/rss+xml"/><item><title>clocでgit管理下にあるファイルだけを対象とする</title><link>https://tunepolo.github.io/til/git/cloc/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://tunepolo.github.io/til/git/cloc/index.html</guid><description>clocではvcsオプションがあり、git配下にあるファイルのみを対象とできる。&#10;Respect .gitignore · Issue #49 · AlDanial/cloc $ cloc --vcs=git 169 text files. 163 unique files. 36 files ignored. github.com/AlDanial/cloc v 1.80 T=0.35 s (439.0 files/s, 10178.5 lines/s) ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- Ruby 89 310 388 1590 Haml 38 3 2 315 Sass 8 39 21 250 YAML 10 52 105 220 HTML 3 15 3 182 Markdown 1 15 0 28 JSON 1 0 0 5 JavaScript 3 3 26 4 CSS 1 0 15 0 CoffeeScript 1 0 3 0 ------------------------------------------------------------------------------- SUM: 155 437 563 2594 ------------------------------------------------------------------------------- clocのオプションを設定するよりはgitのサブコマンドをエイリアスで定義する方が楽チン。</description></item><item><title>git secretsの基本操作</title><link>https://tunepolo.github.io/til/git/basic_secrets/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://tunepolo.github.io/til/git/basic_secrets/index.html</guid><description>Homebrewでインストールする。&#10;$ brew install git-secrets git-secretsを利用するリポジトリでhookのインストールを行い、パターンを登録する。&#10;$ git secrets --install $ git secrets --register-aws 全リポジトリにまとめてパターンを設定できる。</description></item><item><title>git submoduleで管理しているリポジトリをリモートの最新に追従させる</title><link>https://tunepolo.github.io/til/git/submodule_pull_origin_master/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://tunepolo.github.io/til/git/submodule_pull_origin_master/index.html</guid><description>$ git submodule update --remote .gitmodulesのbranch指定に従って追従する。指定がない場合は既定ブランチが使われる。&#10;各サブモジュールで直接pullする方法もある。ただしブランチ名を決め打ちすることになる。</description></item><item><title>git submoduleで管理しているリポジトリを削除する</title><link>https://tunepolo.github.io/til/git/submodule_delete/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://tunepolo.github.io/til/git/submodule_delete/index.html</guid><description>$ git submodule deinit path/to/submodule $ git rm path/to/submodule 参考 git submoduleを今風な感じで削除する - Qiita</description></item><item><title>goenvでインストールする</title><link>https://tunepolo.github.io/til/git/goenv/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://tunepolo.github.io/til/git/goenv/index.html</guid><description>Go 1.21以降はgo.modのtoolchainディレクティブとGOTOOLCHAIN環境変数により、Go自身が必要なバージョンを取得して切り替える。 プロジェクトごとにGoのバージョンを合わせたいだけなら、バージョン管理ツールを入れずに済むことが多い。</description></item><item><title>アクセス権の扱い</title><link>https://tunepolo.github.io/til/git/access_right_handling/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://tunepolo.github.io/til/git/access_right_handling/index.html</guid><description>実行権限をつける/はずす 実行権限をつけるとき。&#10;$ git update-index --add --chmod=+x [filename] 実行権限を外すとき。&#10;$ git update-index --add --chmod=-x [filename] アクセス権の違いを無視する $ git config core.filemode false</description></item><item><title>ブランチ名に別名をつける</title><link>https://tunepolo.github.io/til/git/symbolic-ref/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://tunepolo.github.io/til/git/symbolic-ref/index.html</guid><description>symbolic-refで別名がつけられる。&#10;たとえば下記によりSubversionで使われていたtrunkを残しつつ、masterの名前で使えるようにする。</description></item><item><title>自己証明書でホストされたgitリポジトリにアクセスする</title><link>https://tunepolo.github.io/til/git/ignore_ssl_verify/index.html</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://tunepolo.github.io/til/git/ignore_ssl_verify/index.html</guid><description>Gitlabなどの場合、証明書の検証で失敗することがある。&#10;検証そのものを無効化する方法は広く知られているが、--globalで設定すると全リポジトリの通信で検証が無効になるため避けたい。 CA証明書を持っているなら、対象ホストにだけ設定するのがよい。</description></item></channel></rss>