1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

githubでWordPress用のリポジトリを作ったら.gitignoreが自動的に追加されて便利だった

Last updated at Posted at 2025-10-09

概要

githubでリポジトリを作る際にConfigurationの欄の
Add .gitignore のWordPressを選択する

image.png

プルダウンを選択しリポジトリを作成すると .gitignoreがデフォルトで出来た状況のリポジトリが出来上がる。
内容を確認すると以下

.gitignore
# Wordpress - ignore core, configuration, examples, uploads and logs.
# https://github.com/github/gitignore/blob/main/WordPress.gitignore

# Core
#
# Note: if you want to stage/commit WP core files
# you can delete this whole section/until Configuration.
/wp-admin/
/wp-content/index.php
/wp-content/languages
/wp-content/plugins/index.php
/wp-content/themes/index.php
/wp-includes/
/index.php
/license.txt
/readme.html
/wp-*.php
/xmlrpc.php
以下略



あらかじめカスタムしないディレクトリ等を含めないようにしてくれている。
プラグインやthemeのインストールも不要の場合は要追記。

あとはローカルで開発するディレクトリで

$ git clone hogefuga_repo .

ドットを付けてディレクトリコピーしないようにしてローカルで作業を進める。
コラボレーションツールデフォルトのgitを使っていたのでgithubの至れり尽くせりをここに来て強く感じるようになった。便利な物は積極的に使っていく。

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?