# recommended .gitignore for PHP/PECL extensions

- Thread: https://externals.io/message/88498
- Original archive: https://news-web.php.net/php.internals/88498
- Started by j adams on 2015-09-25T19:10:33+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #88498 — j adams — 2015-09-25T19:10:33+00:00

URL: https://externals.io/message/88498#88498

I have made good progress on a PHP extension and I'd like to post it on
github to get some review and help from some others. The folder has quite a
few files and I'm hoping to avoid putting anything in git that doesn't need
to be there.

I see that php 5.6 has this .gitignore file:
http://git.php.net/?p=php-src.git;a=blob_plain;f=.gitignore;hb=f5751638dbd77136ce5c90e7d8bd090aa655c2a3

But that one is for the root of the php project. I just want my git repo to
contain my code in the ext/extension-name folder.

Can anyone recommend a good .gitignore file for extensions? I looked around
in a bunch of the PECL dirs and found a couple:
http://git.php.net/?p=pecl/languages/v8js.git;a=tree
http://git.php.net/?p=pecl/networking/ssh2.git;a=tree

---

## #88504 — Michael Wallner — 2015-09-25T21:53:28+00:00

URL: https://externals.io/message/88498#88504 · In reply to: #88498

>
> I have made good progress on a PHP extension and I'd like to post it on
> github to get some review and help from some others. The folder has quite
a
> few files and I'm hoping to avoid putting anything in git that doesn't
need
> to be there.
>
> I see that php 5.6 has this .gitignore file:
>
http://git.php.net/?p=php-src.git;a=blob_plain;f=.gitignore;hb=f5751638dbd77136ce5c90e7d8bd090aa655c2a3
>
> But that one is for the root of the php project. I just want my git repo
to
> contain my code in the ext/extension-name folder.
>
> Can anyone recommend a good .gitignore file for extensions? I looked
around
> in a bunch of the PECL dirs and found a couple:
> http://git.php.net/?p=pecl/languages/v8js.git;a=tree
> http://git.php.net/?p=pecl/networking/ssh2.git;a=tree

The "standard" .gitignore is generated by the ext_skel script, see
http://git.php.net/?p=php-src.git;a=blob;f=ext/ext_skel;h=a1c64640ae63b15149add0f1e94378edc7291a38;hb=HEAD

---

## #88505 — francois@php.net — 2015-09-25T22:51:33+00:00

URL: https://externals.io/message/88498#88505 · In reply to: #88498

Le 25/09/2015 21:10, j adams a écrit :
> I have made good progress on a PHP extension and I'd like to post it on
> github to get some review and help from some others. The folder has quite a
> few files and I'm hoping to avoid putting anything in git that doesn't need
> to be there.
>
> I see that php 5.6 has this .gitignore file:
> http://git.php.net/?p=php-src.git;a=blob_plain;f=.gitignore;hb=f5751638dbd77136ce5c90e7d8bd090aa655c2a3
>
> But that one is for the root of the php project. I just want my git repo to
> contain my code in the ext/extension-name folder.
>
> Can anyone recommend a good .gitignore file for extensions? I looked around
> in a bunch of the PECL dirs and found a couple:
> http://git.php.net/?p=pecl/languages/v8js.git;a=tree
> http://git.php.net/?p=pecl/networking/ssh2.git;a=tree
>

 From the ext_skel script :

.deps
*.lo
*.la
.libs
acinclude.m4
aclocal.m4
autom4te.cache
build
config.guess
config.h
config.h.in
config.log
config.nice
config.status
config.sub
configure
configure.in
include
install-sh
libtool
ltmain.sh
Makefile
Makefile.fragments
Makefile.global
Makefile.objects
missing
mkinstalldirs
modules
run-tests.php
tests/*/*.diff
tests/*/*.out
tests/*/*.php
tests/*/*.exp
tests/*/*.log
tests/*/*.sh

Regards

François
