Often it is extremely helpful to embed one git repository into another. An example that comes to mind is when you want to vendor dependencies for a project. This is where git submodule comes in. The submodule command clones one repo into a sub-directory controlled by another git repository. Git still controls version control over both repositories (master and embedded) and allows you to easily pin the embedded repository to a specific commit, version, or branch.
In my previous article I showed you how to make the ls command display colored output; now I am going to show you how to customize what colors get displayed. We are going to use the LS_COLORS environment variable to accomplish this task.
You can change your LS_COLORS environment variable by setting it in your $HOME/.bash_profile or $HOME/.bashrc file. The syntax for LS_COLORS is as follows:
Unix uses the ls command to list the contents of a directory. By default ls displays all directories and files the same way, leaving you without the ability to quickly determine what type of files you are looking at (in Unix everything is a file). Here is an screenshot showing the default output of ls on OS X:
ls has the ability to color code different file types by passing the --color option to ls.
I came to OS X from the wonderful world of Linux; upon doing so I really missed my customized terminal prompt; after all, the default Mac OS X prompt is really boring and blah.
Customizing the default shell prompt not only makes the terminal that much more exciting, it will also help you remember which system you are currently on and the directory you are about to run a command in (Yea!