Configuring your local environment
Specific projects might have their own sets of required configurations, so the focus for this guide is on interoperability between remote GitHub repositories, your local Git configuration, and your code editor.
These instructions are focused on setting up a Mac OS X development environment.
If you need help configuring a Windows machine please sign up for a developer training session.
Download and install Atom
Atom is the lowest-common-denominator editor used by CoA web developers. It’s lightweight, free, and is easy to set as your default Git editor. It’s okay if you use a different editor for your daily work. This guide focuses on using Atom simply as your default Git editor. You are welcome to configure any editor you wish, but troubleshooting support will only be provided for Atom.
Download and install Atom from atom.io
Download and install Git
You’ll need Git installed on your system in order to do pretty much anything related to this workflow. This is not the GUI client, but instead a system-level installation that allows you to incorporate independent tools like Atom and Terminal to your workflow.
Download at https://git-scm.com/downloads
Set Atom as your default Git editor
In order to adhere to the development process it is necessary to set a default Git editor. This makes it easy to compose thoughtful and exhaustive commit messages, which is a critical part of a sustainable and scalable development culture.
Again, you are welcome to configure any editor you wish, but the instructions below will focus on using Atom on your Windows or Mac machine.
Launch Terminal.app on your Mac and enter the following command:
$ git config --global core.editor "atom --wait"
Store your GitHub credentials so you don’t have to provide them for every request
HTTPS is the recommended authentication method for your machine’s communication with GitHub. To avoid having to re-enter your credentials for every request you can cache your GitHub credentials in the credential helper. See the instructions on GitHub.com.
There is a sample repository you can use to trigger the initial authentication request. Here’s how to use it:
- For GitHub.austintexas.gov:
authentication-testingrepository to your local projects directory
$ git clone https://github.austintexas.gov/ctm-sandbox/authentication-testing.git
$ git clone https://github.com/cityofaustin/authentication-testing.git
- Enter your email/username and password when prompted
- TODO Add next steps by testing my own version
Make sure that you clone and initialize your repositories using the HTTPS URL rather than SSH.
Example HTTPS URL:
Example SSH URL:
If you prefer to use SSH you are welcome to do that instead of or in addition to HTTPS.
Confirm that you did it all correctly
In your shell,
ctm-dev-workflowproject directory you cloned when storing your credentials
Add a new file called
Stage your change for commit using
$ git add .
Commit your change using
$ git commit
Atom should open up a file called
Write a commit title in Line 1, such as “Test environment setup”
Write a commit body in Line 3 such as “This commit is for testing that all of my local setup was configured correctly”
Save the file and close the entire Atom window
You should be re-directed back to your shell window, which should display a note such as
1 file changed, 1 insertion(+), 0 deletion(-)
$ git logand confirm that the commit title and message you entered show up at the top of your shell window
$ git push origin master
If you see an error message that you do not have permissions then congratulations, everything’s correct!
If you are prompted for your credentials again then something went wrong with your credential keychain.