LoginSignup
24
21

More than 5 years have passed since last update.

これだけはやりたいGit初期設定

Posted at

Gitを利用しはじめるとき、これだけはやっておきたい設定をまとめてみました。
とくに、開発のときは問題なくてもLinuxなど本番配備時には 権限変更 が発生すると思います。
デフォルトのままだと、chmodなどのパーミッションの変更も、git statusで変更とされてしまうため、 chmodのパーミッション変更を無視する を設定しましょう。

ユーザーを設定する

$ git config --global user.name "<設定する名前>"
$ git config --global user.email <設定するメールアドレス>

自己証明書(オレオレ証明書)を許容する

$ git config --global http.sslVerify false

コマンドのエイリアスを設定する

$ git config --global alias.st status
$ git config --global alias.co checkout
$ git config --global alias.br branch
$ git config --global alias.up rebase
$ git config --global alias.ci commit

chmodのパーミッション変更を無視する

git config core.filemode false

初期設定が終わったら、gitの基本的なコマンドは以下を参照してください。

Gitでよく使うコマンドまとめ

24
21
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
24
21