How to customize Git preferences, macOS preferences, and GitHub repos in Ruby on Mac Ultimate

Git config setup

You’ll get a .gitconfig with common settings and helpful shortcuts, a .gitignore_global with common files you’d want to exclude from all repos, and a gitconfig.yaml to customize your Git name, email, and editor. It looks like this:

user:
  name: "Rosie Revere"
  email: "rosie@example.com"

# Possible values are: atom, bbedit, brackets, emacs, macvim, nano, sublime, textmate, vim, vscode
# Let me know if your favorite editor is missing
editor: "sublime"

That way, you don’t have to search for the commands for setting these values. As new features get added to Git, I’ll update the .gitconfig file and you can choose to copy them over to your local file.

Clone GitHub repos

If you work on several projects, you know how tedious it is to clone all the repos manually one by one. With Ruby on Mac Ultimate, all you have to do is specify them once in a readable YAML file, and Ruby on Mac clones them all in the right place in seconds.

Here’s what it looks like:

# For each repo you want to clone from GitHub, specify the path and the
# repo name. Include both the GitHub username or org name and the repo name,
# separated by a slash.
# For example:
# - path: ~/projects/monfresh
#   name: monfresh/Keyboard-Maestro-Macros

- path: ~/projects/codeforamerica
  name: codeforamerica/ohana-api

- path: ~/projects/rubyonmac
  name: rubyonmac/rubyonmac-ultimate

macOS preferences

This one is my favorite. Whenever I set up a new Mac, I always make several changes to the default macOS prefs. And for the longest time, I didn’t have a checklist, so I wasted a lot of time trying to remember which settings I needed to change and where to find them.

For example, I turn on tap to click and tap to drag, I disable autocorrect, I turn on the Developer Settings in Safari, I switch to DuckDuckGo for search, I set the Dock to autohide, and a bunch more.

Luckily, Apple gives access to most macOS prefs via the command line, which means we can automate the process. The bad news is that there’s no official documentation that I know of. I spent over 50 hours figuring out the right commands and testing them on various macOS versions.

But wait, it gets better! I made it super easy to customize the preferences. Rather than making you deal with complicated and hard-to-read commands, all you have to do is fill out a YAML file with easy-to-understand settings. Here’s everything that’s available to configure as of now:

dock:
  autohide: true
  # possible values for orientation: bottom, left, right
  orientation: "bottom"
  rearrange_spaces_in_mission_control: false

# might require logging out and back in
trackpad:
  tap_to_click: true
  tap_to_drag: true

finder:
  show_status_bar: true
  show_path_bar: true
  # possible values for new finder window: home, desktop, documents, icloud, recents
  open_new_windows_in: "home"
  warn_before_emptying_trash: true
  # possible values for view style: list, icons, columns, gallery
  preferred_view_style: "list"
  # possible values for grouping stacks:
  # kind
  # date_last_opened
  # date_added
  # date_modified
  # date_created
  # tags
  stacks_group_by: "kind"

# Possible values for hot corners:
#  0: no-op
#  2: Mission Control (all windows)
#  3: Show application windows
#  4: Desktop
#  5: Start screen saver
#  6: Disable screen saver
# 10: Put display to sleep
# 11: Launchpad
# 12: Notification Center
# 13: Lock Screen
# 14: Quick Note
hot_corners:
  bottom_left: 0
  bottom_right: 0
  top_left: 0
  top_right: 0

keyboard:
  text:
    correct_spelling_automatically: false
    capitalize_words_automatically: false
    add_period_with_double_space: false
    use_smart_quotes: false
    use_smart_dashes: false

iterm:
  prompt_on_quit: false

# requires quitting and relaunching Safari if open while prefs are being set
safari:
  show_develop_menu: true
  # possible values for search engine: duckduckgo, google, yahoo, bing, ecosia
  default_search_engine: "duckduckgo"

time_machine:
  do_not_prompt_to_use_new_hard_drives_as_backup_volume: true

date_and_time:
  # EEE: 3-letter day of the week
  # d MMM: day of the month and 3-letter month name
  # H: for 24-hour clock
  # h: for 12-hour clock
  # mm: minutes
  # ss: to display seconds
  # a: to display AM/PM
  format: "EEE d MMM  h:mm:ss a"
  use_24_hour_clock: false