Studyon Minte9.com
Git




Exclude files



	$ git init

	$ mkdir controllers
	$ cd controllers/
	$ touch controller.php

	$ cd ..

	$ mkdir models
	$ cd models/
	$ touch model.php

	$ cd ..

	$ mkdir logs
	$ cd logs
	$ touch log.txt

	$ cd ..

	$ git status
	# Untracked files:
	#
	#       controllers/
	#       logs/
	#       models/


        # --- LOOK HERE

	$ echo "logs/" > .git/info/exclude


	$ git status
	# On branch master
	#
	# Untracked files:
	#   (use "git add <file>..." to include in what will be committed)
	#
	#       controllers/
	#       models/

	$ git add .
	$ git commit -m "m"
		// logs/ will be excluded from commit