Installing Atom
- GitHub’s Atom is rapidly maturing into one of the best code editors available. While it lost to Sublime Text in last year’s SitePoint Smackdown, many issues no longer exist: version 1.0 has been.
- If enabled, you can define your own commands in your atom init.coffee or init.js file. These commands will appear in both the atom command palette as well as the Git-Plus command palette. Just like any other commands, you can define keybindings for them as well. Example command for undoing the last commit.
To get started with Atom, we'll need to get it on your system. This section will go over installing Atom on your system as well as the basics of how to build it from source.
Installing Atom should be fairly simple. Generally, you can go to https://atom.io and you should see a download button as shown here:
Atom A way to uninstall Atom from your system Atom is a computer program. This page holds details on how to remove it from your PC. The Windows version was developed by GitHub Inc. Check out here where you can get more info on GitHub Inc. Usually the Atom program is to be found in the C:UsersUserNameAppDataLocalatom folder, depending on the user's option during setup. GitHub for Atom The GitHub package brings Git and GitHub integration right inside your editor! Now you can switch or create branches, stage changes, commit, pull and push, resolve merge conflicts, view and checkout pull requests and more. A review of the GitHub Atom editor (IDE), at version 1.5.3. Philippe Lhoste (aka. PhiLho, PhiLhoSoft for GitHub & Twitter) Senior Software Engineer.
The button or buttons should be specific to your platform and the download package should be easily installable. However, let's go over them here in a bit of detail.
Installing Atom on Mac
Atom follows the standard Mac zip installation process. You can either press the download button from the https://atom.io site or you can go to the Atom releases page to download the atom-mac.zip
file explicitly. Once you have that file, you can click on it to extract the application and then drag the new Atom
application into your 'Applications' folder.
When you first open Atom, it will try to install the atom
and apm
commands for use in the terminal. In some cases, Atom might not be able to install these commands because it needs an administrator password. To check if Atom was able to install the atom
command, for example, open a terminal window and type which atom
. If the atom
command has been installed, you'll see something like this:
If the atom
command wasn't installed, the which
command won't return anything:
To install the atom
and apm
commands, run 'Window: Install Shell Commands' from the Command Palette, which will prompt you for an administrator password.
Installing Atom on Windows
Atom is available with Windows installers that can be downloaded from https://atom.io or from the Atom releases page. Use AtomSetup.exe
for 32-bit systems and AtomSetup-x64.exe
for 64-bit systems. This setup program will install Atom, add the atom
and apm
commands to your PATH
, and create shortcuts on the desktop and in the start menu.
The context menu Open with Atom
in File Explorer, and the option to make Atom available for file association using Open with...
, is controlled by the System Settings panel as seen above.
With Atom open, click on File > Settings
, and then the System
tab on the left. Check the boxes next to Show in file context menus
, as well as Show in folder context menus
. And you’re all set.
Installing Atom on Linux
You can install Atom on Linux using your distribution's package manager by configuring it to use one of our official package repositories. This will also enable you to update Atom when new releases are published.
Debian and Ubuntu (deb/apt)
To install Atom on Debian, Ubuntu, or related distributions, add our official
package repository to your system by running the following commands:
You can now install Atom using apt-get
(or apt
on Ubuntu):
Alternatively, you can download the Atom .deb package and install it directly:
Red Hat and CentOS (YUM), or Fedora (DNF)
To install Atom on CentOS, Oracle Linux, Red Hat Enterprise Linux, Scientific Linux, Fedora, or related distributions that use the YUM or DNF package managers, add our official package repository to your system by running the following commands:
You can now install Atom using dnf
(or yum
depending on your distribution):
Alternatively, you can download the Atom .rpm package and install it directly:
SUSE (zypp)
To install Atom on openSUSE or other distributions that use the Zypp package manager, add our official package repository to your system by running the following commands:
You can now install Atom using zypper
:
Alternatively, you can download the Atom .rpm package and install it directly:
Updating Atom
You should consider updating Atom periodically for the latest improvements to the software. Additionally, When Atom receives hotfixes for security vulnerabilities you will want to update your version of Atom as soon as possible.
'Automatically Update' is enabled by default in Core Settings of the Settings View, which will allow Atom to check for updates automatically. If you disable this setting you can update Atom manually.
To perform a manual update:
- Click on the
Atom > Check for Update
menu item in the menu bar. - Search for
Application: About
in the Command Palette and click theCheck now
button.
Atom will begin to update if an update is available.
'Automatically Update' is enabled by default in Core Settings of the Settings View, which will allow Atom to check for updates automatically. If you disable this setting you can update Atom manually.
To perform a manual update:
- Click on the
Help > Check for Update
menu item in the menu bar. - Search for
Application: About
in the Command Palette and click theCheck now
button.
Atom will begin to update if an update is available.

If you are using Atom's official package repositories, use your distribution's package manager to update Atom. Otherwise, you will need to manually download and install the latest .rpm
or .deb
package from https://atom.io. For more details, see Installing Atom on Linux.
Portable Mode
Atom stores configuration and state in a .atom
directory usually located in your home directory (%userprofile%
on Windows). You can however run Atom in portable mode where both the app and the configuration are stored together such as on a removable storage device.
To setup Atom in portable mode download the zip/tar.gz package for your system and extract it to your removable storage.
Then create a .atom
directory alongside the directory that contains atom.exe, for example:
Then create a .atom
directory alongside the Atom.app application, for example:
Atom Gitlab
Then create a .atom
directory alongside the directory that contains the Atom binary, for example:
Portable Notes
- The
.atom
directory must be writeable - You can move an existing
.atom
directory to your portable device - Atom can also store its Electron user data in your
.atom
directory - just create a subdirectory calledelectronUserData
inside.atom
- Alternatively you can set the
ATOM_HOME
environment variable to point wherever you want (you can write a .sh or .cmd script to temporarily set it and launch it from that) - Portable mode installations will not automatically update
Building Atom from Source
The Hacking on Atom Core section of the flight manual covers instructions on how to clone and build the source code if you prefer that option.
Proxy and Firewall Settings
Behind a Firewall?
If you are behind a firewall and seeing SSL errors when installing packages you can disable strict SSL by running:
Using a Proxy?
If you are using a HTTP(S) proxy you can configure apm
to use it by running:

You can run apm config get https-proxy
to verify it has been set correctly.
Helpers for working with Git repositories built natively on top oflibgit2.
Installing
Building
- Clone the repository with the
--recurse
option to get the libgit2submodule - Run
npm install
- Run
grunt
to compile the native and CoffeeScript code - Run
grunt test
to run the specs
Docs
git.open(path)
Open the repository at the given path. This will return null
if therepository at the given path does not exist or cannot be opened.
The opened repository will have a submodules
property that will be an objectof paths mapped to submodule {Repository} objects. The path keys will berelative to the opened repository's working directory.
Repository.checkoutHead(path)
Restore the contents of a path in the working directory and index to theversion at HEAD. Similar to running git reset HEAD -- <path>
and then agit checkout HEAD -- <path>
.
path
- The string repository-relative path to checkout.
Returns true
if the checkout was successful, false
otherwise.
Repository.checkoutReference(reference, [create])
Checks out a branch in your repository.
reference
- The string reference to checkoutcreate
- A Boolean value which, if true
creates the new reference
if it doesn't exist.
Returns true
if the checkout was successful, false
otherwise.
Repository.getAheadBehindCount(branch)
Get the number of commits the branch is ahead/behind the remote branch itis tracking. Similar to the commit numbers reported by git status
when aremote tracking branch exists.
branch
- The branch name to lookup ahead/behind counts for. (default: HEAD
)
Returns an object with ahead
and behind
keys pointing to integer valuesthat will always be >= 0.
Repository.getCommitCount(fromCommit, toCommit)
Get the number of commits between fromCommit
and toCommit
.
fromCommit
- The string commit SHA-1 to start the rev walk at.
toCommit
- The string commit SHA-1 to end the rev walk at.
Returns the number of commits between the two, always >= 0.
Repository.getConfigValue(key)
Get the config value of the given key.
key
- The string key to retrieve the value for.
Returns the configuration value, may be null
.
Repository.setConfigValue(key, value)
Get the config value of the given key.
key
- The string key to set in the config.
value
- The string value to set in the config for the given key.
Returns true
if setting the config value was successful, false
otherwise.
Repository.getDiffStats(path)
Get the number of lines added and removed comparing the working directorycontents of the given path to the HEAD version of the given path.
path
- The string repository-relative path to diff.
Returns an object with added
and deleted
keys pointing to integer valuesthat always be >= 0.
Repository.getHeadBlob(path)
Get the blob contents of the given path at HEAD. Similar togit show HEAD:<path>
.
path
- The string repository-relative path.
Returns the string contents of the HEAD version of the path.
Repository.getHead()
Get the reference or SHA-1 that HEAD points to such as refs/heads/master
or a full SHA-1 if the repository is in a detached HEAD state.
Returns the string reference name or SHA-1.
Repository.getIndexBlob(path)
Get the blob contents of the given path in the index. Similar togit show :<path>
.
path
- The string repository-relative path.
Returns the string contents of the index version of the path.
Repository.getLineDiffs(path, text, [options])
Get the line diffs comparing the HEAD version of the given path and the giventext.
path
- The string repository-relative path.
text
- The string text to diff the HEAD contents of the path against.
options
- An optional object with the following keys:
ignoreEolWhitespace
-true
to ignore any whitespace diffs at the end oflines.useIndex
-true
to compare against the index version instead of the HEADversion.
Returns an array of objects that have oldStart
, oldLines
, newStart
, andnewLines
keys pointing to integer values, may be null
if the diff fails.
Repository.getMergeBase(commit1, commit2)
Get the merge base of two commits.
commit1
- The string SHA-1 of the first commit.
commit2
- The string SHA-1 of the second commit.
Returns the string SHA-1 of the merge base of commit1
and commit2
or null
if there isn't one.
Repository.getPath()
Get the path of the repository.
Returns the string absolute path of the opened repository.
Repository.getReferences()
Gets all the local and remote references.
Returns an object with three keys: heads
, remotes
, and tags
.Each key can be an array of strings containing the reference names.
Repository.getReferenceTarget(ref)
Get the target of the given reference.
ref
- The string reference.
Returns the string target of the given reference.
Repository.getShortHead()
Get a possibly shortened version of value returns by getHead()
. This willremove leading segments of refs/heads
, refs/tags
, or refs/remotes
and willalso shorten the SHA-1 of a detached HEAD to 7 characters.
Returns a string shortened reference name or SHA-1.
Repository.getStatus([path])
Get the status of a single path or all paths in the repository. This will notinclude ignored paths.
path
- An optional repository-relative path to limit the status reporting to.
Returns an integer status number if a path is specified and returns an objectwith path keys and integer status values if no path is specified.
Repository.getUpstreamBranch([branch])
Get the upstream branch of the given branch.
branch
- The branch to find the upstream branch of (default: HEAD
)
Returns the string upstream branch reference name.
Repository.getWorkingDirectory()
Get the working directory of the repository.
Returns the string absolute path to the repository's working directory.
Repository.isIgnored(path)
Get the ignored status of a given path.
path
- The string repository-relative path.
Returns true
if the path is ignored, false
otherwise.
Repository.isPathModified(path)
Get the modified status of a given path.
path
- The string repository-relative path.
Returns true
if the path is modified, false
otherwise.
Repository.isPathNew(path)
Get the new status of a given path.
path
- The string repository-relative path.
Returns true
if the path is new, false
otherwise.
Repository.isPathDeleted(path)
Get the deleted status of a given path.
path
- The string repository-relative path.
Returns true
if the path is deleted, false
otherwise.
Repository.isStatusIgnored(status)
Check if a status value represents an ignored path.
status
- The integer status value.
Returns true
if the status is a ignored one, false
otherwise.

Repository.isStatusModified(status)
Check if a status value represents a modified path.
status
- The integer status value.
Returns true
if the status is a modified one, false
otherwise.
Repository.isStatusNew(status)
Check if a status value represents a new path.
status
- The integer status value.
Returns true
if the status is a new one, false
otherwise.
Repository.isStatusDeleted(status)
Check if a status value represents a deleted path.
status
- The integer status value.
Returns true
if the status is a deleted one, false
otherwise.
Repository.isSubmodule(path)
Check if the path is a submodule in the index.
path
- The string repository-relative path.
Returns true
if the path is a submodule, false
otherwise.
Repository.refreshIndex()
Reread the index to update any values that have changed since the last time theindex was read.
Repository.relativize(path)
Atom Git Download
Relativize the given path to the repository's working directory.
path
- The string path to relativize.
Returns a repository-relative path if the given path is prefixed with therepository's working directory path.
Atom Git Branch
Repository.isWorkingDirectory(path)
Is the given path the repository's working directory?
It is better to call this method than comparing a path directly againstthe value of getWorkingDirectory()
since this method handles slashnormalization on Windows, case insensitive filesystems, and symlinkedrepositories.
path
- The string path to check.
Returns true
if the given path is the repository's working directory,false otherwise.
Repository.release()
Release the repository and close all file handles it has open. No other methodscan be called on the Repository
object once it has been released.
Repository.submoduleForPath(path)
Get the repository for the submodule that the path is located in.
path
- The absolute or repository-relative string path.
Returns a Repository
or null
if the path isn't in a submodule.
Repository.add(path)
Stage the changes in path
into the repository's index. Clear any conflict stateassociated with path
.
Github Atom Editor
path
- A repository-relative string path.
Atom Github Login
Raises an Error
if the path isn't readable or if another exception occurs.
