Developer environment: Atom, Git, and Windows

How to set up your developer environment if you are on Windows, and need to edit code in Gitlab/Github

Atom is a beautiful, open-source text editor that will let you browse the tree of your code, jump easily between folders, and see color-coded text to make things easier to read. If you are on Windows, you may feel that your environment does not look as cool as on Mac, but by using Atom, you will take things up a notch in coolness.

What problem does this solve? If you need to edit Unix code on Windows, you must save it natively as Windows, with the correct permissions and ownership. If you try other crossover tools such as Ubuntu Bash on Windows, you may run into issues with corrupted files since you are trying to edit from both your local editor and from the Unix emulated command line.

  1. Install Atom and Git-Plus plugin
  2. Install Git-Bash for Windows – this provides all the unix tools you will need.
  3. Install Pageant for ssh agent – also see this site
    1. Create an ssh key (passphrase protected)
    2. Upload your ssh key to your Gitlab/Github profile settings
    3. Configure plink.exe to be your ssh tool
    4. Create a shortcut that opens Pageant with your ssh key

Then you will be able to use Git-Bash for Windows to edit files in git via command line. Or, if you prefer the graphical environment, you can use Atom with the integrated Git-Plus or similar tools.

Example usage for this is to commit and push your git changes via Atom, then have your webapp do a git pull to synchronize the changes.

Tips for using Atom:

Open your project with Atom: Right-click, Add Project Folder

Git commands: Ctrl-Shift-A + S =  git status
Ctrl-S to save changes to the file (takes a second)
Ctrl-A or Ctrl-Shift-A – add
Ctrl-Shift-X Commit
Control-Shift-H for git-plus menu including Add and Commit and Push