Setting Up Git to Ignore ELF Binaries (C/C++ Output on Linux)
The starting point for this experiment was from here
An Example using C Program Source
Let’s say we have a pre-existing directory of some C source code files:
$ lsMakefile print print.c print.h print.o
And we initialize a new git repository in that directory:
$ git initInitialized empty Git repository in /home/user/tmp/printer/.git/$ cat .gitignore# Ignore all*# Unignore all with extensions!*.*# Unignore all dirs!*/# Unignore make files!Makefile# Ignore .o files*.o# Ignorebindirbin/# or*/bin/*
GCC can't find stdio.h in Alpine Linux
A while ago, I installed the iSH app on my iPad which made it possible for me to develop Python and C code as well as use it as an SSH client. However, I ran into an issue when trying to compile C code because the compiler couldn’t resolve stdio.h. The following excerpt from StackOverflow resolves the issue:
Install libc-dev in addition to GCC, or just install build-base for everything (alpine-sdk is probably an overkill). To install run the following command: