Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which files of an autoconf project to put into .gitignore?

We have the ctemplate library included in our git-managed project which is based on GNU Autoconf.

I would like to put everything which is generated by Autoconf into the .gitignore file to avoid conflicts if someone accidentally commits his platform-specific generated files.

Can someone tell me how to figure out the complete list of files autoconf generates/modifies for all platforms (Mac, Ubuntu, CentOS, etc.)?

like image 939
Korbi Avatar asked May 06 '13 17:05

Korbi


People also ask

Where do I put the Gitignore file?

gitignore file is usually placed in the root directory of a project. You can also create a global . gitignore file and any entries in that file will be ignored in all of your Git repositories.

How do I add a Gitignore to an existing project in Visual Studio?

Open Visual Studio and the solution needing an ignore file. From the top menu select Git > Settings. The above will open Visual Studio's Options with Source Control > Git Global Settings selected. From the list on the left select Git Repository Settings and then click the Add button for Ignore file.


1 Answers

Here is what I have in my various .gitignore (on Debian testing):

Shared library: (libtool)

/Makefile
/Makefile.in
/aclocal.m4
/autom4te.cache/
/config.*
/configure
/depcomp
/install-sh
/libtool
/ltmain.sh
/m4/
/missing
/stamp-h?
.deps/
.dirstamp
.libs/
*.l[ao]
*~

Executable:

/Makefile
/Makefile.in
/aclocal.m4
/autom4te.cache/
/config.*
/configure
/m4/
/stamp-h?
.deps/
.dirstamp
*.o
*~

You may want to adapt this a bit, but this is the bulk of it. make dist-clean followed by commit, rebuild, and finally git status may show you new files though, depending on what exactly your build generates.

like image 98
syam Avatar answered Sep 24 '22 18:09

syam