Lazy Diary @ Hatena Blog

PowerShell / Java / miscellaneous things about software development, Tips & Gochas. CC BY-SA 4.0/Apache License 2.0

Git

submoduleとsubtreeの.gitディレクトリの違い

Git

submoduleの場合 コミットが1つもないリポジトリにはsubmoduleの追加はできない submoduleの先のオブジェクトは.gitディレクトリには保存されない $ git clone https://github.com/satob/main-submodule.git Cloning into 'main-submodule'... warning: You …

PowerShell上でgit diff中の日本語が文字化けするのを直す

前提条件 PowerShellから下のようにgit diffを実行する。 PS C:\git\checkstyle> Get-ChildItem -Recurse | Where-Object { $_.Name -like "messages_ja.properties" } | ForEach-Object { $_.FullName.substring(29) } | ForEach-Object { Write-Output "`n…

GitLabのworker_processesの設定

Git

GitLabのunicornの設定のうち、worker_processes(プロセス数)はCPUコア数+1がおすすめ、という話がGitLabのドキュメントに載っている。 https://docs.gitlab.com/ee/install/requirements.html#unicorn-workers なんだけど、これってだいたい奇数になるし…

Push source to GitHub/GitLab repository without type password

Background The passphrase stored in ssh-agent is invalidated when the git client machine is rebooted. If you want to access GitHub/GitLab without type password (e.g. push/pull source in Jenkins), you have to use a ssh public/public key pai…

Invoke-RestMethod to GitLab API causes mojibake

Context In PowerShell, You can call REST API with Invoke-RestMethod like: Invoke-RestMethod -Headers $headers -Method Get -Timeout 10 -Uri "https://api.github.com/users/octocat/orgs" Problem The result of Invoke-RestMethod causes mojibake …

Difference of GitHub API and GitLab API

Format of Personal Access Tokens In GitHub, personal access tokens are hex string, like e72e16c7e42f292c6912e7710c838347ae178b4a. In GitLab, personal access tokens are like Base62 string, like 9koXpg98eAheJpvBs5tK. Personal Access Tokens a…

ISO/IEC 12207 (JIS X 0160:2012) ソフトウェア構成管理プロセスのうちバージョン管理システム、GitHub/GitLab/etc、git-flow/GitHub Flowでカバーできる内容

(In English: What can you do for ISO/IEC 12207 (JIS X 0160:2012) Software Configuration Management Process with VCSs, GitHub/GitLab/etc, and git-flow/GitHub Flow) ISO/IEC 12207 (JIS X 0160:2012)では、ソフトウェア開発におけるソフトウェア構…