You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-8
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,15 @@
1
1
# Beautify Git in Your MacOS or OSX Terminal
2
2
3
-
This set of config files can help transform your command line from something ugly and painful to something delightful and easy-to-read.
3
+
This set of config files will transform your command line from ugly and painful to delightful and easy-to-read.
4
4
5
5

6
6
7
7
## Setup
8
8
First things first, you'll want to install a nice color theme for your terminal. The one in the screenshot above is called TupeloHoney, and you'll find it included in the repo. I based it off of the most excellent [Flat](https://github.com/ahmetsulek/flat-terminal) theme.
9
9
10
-
Load the theme by opening up your mac terminal and navigating to **Preferences > Profiles > Import**. Don't expect things to suddenly look like they do above—*we still have work to do*.
10
+
Load the theme by opening up your mac terminal and navigating to **Preferences > Profiles > Import**, and then set the theme as your default.
11
11
12
-
With that out of the way, log into your bash terminal and punch in the following git config commands. You should be able to copy & paste them as a full block and then just hit return. This tells git that we want color in our UI, and sets specific colors for specific file status types.
12
+
Now log into your bash terminal and punch in the following git config commands. You should be able to copy & paste them as a full block and just hit return. This tells git that we want color in our UI, and sets specific colors for specific file status types.
git config --global color.status.branch "yellow normal bold"
23
23
git config --global color.status.header "white normal bold"
24
24
```
25
-
The final step is to update your .bash_profile with the contents of the bash_profile file included in the repo. The easiest way to do this will be to first show all hidden files on your system, so that you can find that invisible .bash_profile file. You can do this by pasting the following command into your terminal.
25
+
Now you'll need to update your .bash_profile with the contents of the bash_profile file included in the repo. The easiest way to do this will be to first *show all hidden files* on your system, because .bash_profile is usually set to invisible. You can show hidden files by pasting the following command into your terminal.
26
26
27
27
```sh
28
28
defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app
29
29
```
30
-
Once your finder reloads, you should be able to see all hidden files (files with names that start with a '.') Now navigate to **Users/YourUserNameHere**, and you should see .bash_profile in the directory. If you don't, you simply have to create one (you can do this by just placing an empty text file there and naming it .bash_profile.)
30
+
Once your finder reloads, you should be able to see all hidden files. In the finder, navigate to **Users/YourUserNameHere**, and you should see .bash_profile listed in the directory. If you don't, you simply have to create one yourself (just place an empty text file there and name it .bash_profile.)
31
31
32
-
Either way, open your .bash_profile and paste in the contents of the bash_profile file included in this repo (paste it beneath any other content that's already in there.) Now save the file.
32
+
Either way, open your .bash_profile and paste in the contents of the bash_profile included in this repo (paste it beneath any other content that's already in there.) Now save the file.
33
33
34
34
**Congratulations!** Your .bash_profile now includes all the code that your terminal needs to display it's UI in color, including a nicely colorized bash -ls command, a customized command prompt, and aliases for a number of highly-readable git log formats. You can customize these to your heart's content, but hopefully this will give you a solid jumping-off point.
35
35
36
-
Now let's hide those invisible files again, by pasting the following command into the terminal.
36
+
Now let's hide those invisible files again, by pasting the following command into the terminal and hitting return.
37
37
38
38
```sh
39
39
defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app
@@ -42,7 +42,7 @@ Restart the terminal app, and you're ready to go!
42
42
43
43
## Usage
44
44
45
-
With any luck, you should now have a nice looking command line terminal running on your Mac. Navigate to one of your git repositories as you nomrally would and take a few of the included git log aliases for a ride.
45
+
With any luck, you should now have a nice looking command line terminal running on your Mac. If you like, point the terminal to one of your git repositories and take a few of the included git log aliases for a ride.
46
46
47
47
```sh
48
48
log
@@ -56,6 +56,10 @@ Now explore the other log aliases if you like:
56
56
- 'loggv' displays an ascii graph of your branches, along with more verbose log info.
57
57
- 'logm' displays multi-line commit messages.
58
58
59
+
Lastly, type in the trusty '-ls' bash command and you should see a nicely colorized list of files, directories, etc.
0 commit comments