Git」タグアーカイブ

.gitignoreの内容が反映されない場合

.gitignoreに書いたのに無視されない(.gitignoreの内容が反映されない)場合は

$ git rm --cached path/to/file

を試してみると良いそうです。

.gitignoreへの記述前にインデックスされたファイルについては無視されないようになっているみたいです。

リンク

[Git] .gitignoreの仕様詳解 – Qiita
https://qiita.com/anqooqie/items/110957797b3d5280c44f

GitHub Freeでプライベートリポジトリが作成可能になりました

GitHubの無料プランでプライベートリポジトリの作成が可能になったそうです。

Unlimited free private repositories with GitHub Free and a unified business offering with GitHub Enterprise | The GitHub Blog
https://blog.github.com/changelog/2019-01-08-pricing-changes/

個人的にはNASにGitをインストールして使っていますが、その作業が煩わしかったり物理的に離れた場所にいる人と共同で開発をしている人にとっては選択肢が増えたのではないかと思います。

FreeプランとProプランの比較

FreeプランProプラン
Publicリポジトリ
Privateリポジトリ
GitHub PagesとWiki
(Publicリポジトリのみ)
価格無料7ドル/月

リンク

Pricing · Plans for every developer · GitHub
https://github.com/pricing

Gitのユーザー名とメールアドレスを設定

Gitのユーザー名とメールアドレスを設定するコマンド

リポジトリ内で

$ git config user.name "yourname"
$ git config user.email "yourname@example.com"

全体で

$ git config --global user.name "yourname"
$ git config --global user.email "yourname@example.com"

設定内容の確認

$ git config user.name
yourname

$ git config user.email
yourname@example.com