LoginSignup
0
0

More than 3 years have passed since last update.

Git操作まとめ 〜Gitのバージョン管理が必要ないファイルやディレクトリを除外する(.gitignore)

Last updated at Posted at 2019-11-24

この記事では、Ubuntu18.04LTSにインストールしたGit(version 2.17.1)を使用しています。

.gitignore

Gitは、git initしたディレクトリの全てを履歴管理していきます。
そのディレクトリの中でも、履歴を追う必要のないファイルやディレクトリが出てくることがあります。

そうした場合、Git管理下のディレクトリで、.gitignoreというファイルを作成し、そこにGitの管理対象外にしたいファイルやディレクトリを記載することで、Gitの管理対象のから除外することができます。

touch .gitignore

.gitignoreファイルをエディタで開いてGitの管理対象外にするファイルを記述すればOKです。

この.gitignoreファイルはGitの管理対象にしておかなければならない(コミットする)ので、注意が必要です。


本記事目次ページ

Git操作まとめ

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