![]() ![]() The following colors are available as options: - normalĪnd the following modifiers are also available: - boldĬhaining together two colors will set the foreground and background, respectively. If you'd like a bit more customization, open up your ~/.gitconfig in your favorite editor and change the values you want. Some versions of git come with coloring turned on as default, but if yours is currently dull and single-colored, type the following in terminal for a quick change: git config -global color.ui auto git config -global color.ui false The default setting is auto, which colors output when it’s going straight to a terminal, but omits the color-control codes when the output is redirected to a pipe or a file. ![]() $ git config -global user.email git config -global color.Add some color to your shell by editing your ~/.gitconfig file - it makes everything easier to read, and it's a lot more pleasing to the eye. You should set your name and email address as well as enable coloring to pretty up command outputs: $ git config -global user.name "John Doe" You'll find this in the "Utilities" subfolder of your "Applications" folder in Finder: Configuring GitĪ couple of very basic configurations should be made before you get started. The following configuration levels are available in the Git config. Git Command Line color settings 30 June 2016 by Paul Schaeflein. The git config command can accept arguments to specify the configuration level. You can set the color value as true, false, auto, and always. Once this is installed, you can jump right into Git by starting "Terminal.app" on your Mac. The default value of color.ui is set as auto, which will apply colors to the immediate terminal output stream. Windows high contrast mode uses something similar to Highlight system color for focus outlines so that it uses a different colour than borders. On Mac OS X, a one-click installer package is available that can be downloaded from here: /projects/git-osx-installer You'll find it in the Windows START menu, inside the "Git" folder: Installing Git on Mac OS Im a huge fan of having the branch and status for my current project reflected in my bash prompt. After finishing the installation, you can begin working with Git by starting the "Git Bash" application. Show your git status and branch (in color) at the command prompt. When running the installer EXE, you should choose the default options in each screen. On Windows, you can download the "Git for Windows" package from here: There are one-click installers for both Mac and Windows. Installing Git has become incredibly easy in recent times. You'll find a more detailed discussion on the topic of Desktop GUIS later in this book (see " Part 5: Tools & Services"). Here's what mine looks like: And here's how to get that: First define some colors. I'm a huge fan of having the branch and status for my current project reflected in my bash prompt. We highly recommend that you have a look at Tower, the Git client that is trusted by over 80,000 users in companies like Apple, Google, Amazon, IBM, and Twitter. Show your git status and branch (in color) at the command prompt. In case the command line is all Greek to you, I've prepared a "Command Line 101" in the appendix for you that will show you the most important basics.Īs soon as you're beyond the raw basics, you should consider using a GUI application to make your day-to-day work easier and more productive. ![]()
0 Comments
Leave a Reply. |