Customizing Your Bash Profile

There is a hidden file on your Mac inside your user “home” directory named .bash_profile.

Before Terminal loads your shell environment, the .bash_profile is loaded (or “sourced”). Inside this file, you can have custom preferences for the way you want your command line interface to look and operate – like changing your terminal prompt, the colors of your text, adding aliases (shortcuts) to commands and functions you use most often, and more.

Here’s a quick tutorial on how to customize this file:

Navigate to your home directory: cd ~

List hidden files to see if the .bash_profile already exists: ls -ld .*

If it does exist go to the next step, if it does not exist, then create it: touch .bash_profile

Clone a repo onto our computer using SSH

The first thing to do is create a new public repo on your GitHub.com account. Also be sure to give it a “README” file by default.

After your repo is created, it will have it’s very own URL which can be used to clone this repo to your computer.

GitHub has a simple example of how to do this, however, instead of using HTTPS, you’ll want to use SSH.

Commit and push changes back to GitHub.com

Now that you have a repo from GitHub cloned onto your computer, you can start adding files to it locally, committing those files and pushing them back to GitHub.

Create a new file, like: style.css

Put something in this file and save it

In terminal, do: git status

Now we’re going to “queue up” our change: git add -A

Now we can commit this file: git commit -m 'My first commit!'

Now we can “push” this commit to our remote repo at GitHub: git push

Go to your repo at GitHub.com and see your new file has been added!

Next Steps

Now that you’ve jumped into the shallow end of Git, you’ll want to continue learning and exploring all of its amazing possibilities, such as, ignoring files, viewing diffs and stats, merging, tagging, stashing, rebasing, and more!

Here are a few helpful links to continue your Git learning:

How to ignore files – This is an important next step to learn about if you don’t want everything in your project to be under version control.

GitRef.org – Consider this your “Git Bible” for learning more about Git commands.

git ready – Don’t let the punny name fool you. This site has excellent “how-to” style tutorials on using Git.