How can I run `git commit` and `git push` in atom?

What you're looking for is the git-plus package. Install that - it provides full Git integration with commands like commit, add, push, pull and lots of others.

Git-Plus


There've been some developments since this question was initially asked. Both git commit and git push (along with lotsa other commands) are now available in the app natively (version 1.18+).

There is a GUI for staging and reviewing changes as well as committing them with a commit message.

enter image description here

Just double-click to stage or un-stage files. Clicking on a file in Atom's Git GUI will load up the colored diff for reviewing changes. Type in a commit message right there in the text entry box and click the button to make the commit! Commit title's with message bodies (just a new line separating them) is supported - there's even a counter to let you know when your git commit message title is getting too long.

Also, when you have a change that's been staged and committed, you can push the contribution to your GitHub repository by pushing the down/up arrows at the bottom right to load up the options:

enter image description here

...then selecting the "Push" option:

enter image description here

Up goes your commits to the cloud!

See: https://github.atom.io/

Note as well that there is a branch display which can be used to switch branches or create new ones. Also, you can do pulls and fetching.


To stage new files and changes, and make a commit you also can access the git tools from either the Packages Tab:

enter image description here

... or the View Tab:

enter image description here

A push will, of course, require your username and password.

Also, setting up the GitHub preview requires authentication:

enter image description here


ctrl+9 opens the "Git" pane
...and ctrl+shift+9 will close it.

ctrl+8 opens the "GitHub(preview)" pane
...and ctrl+shift+8 will close it.

One way to configure git so you can bypass manually entering your username and password while using these Atom features:

  1. Set your Git user info in the .gitconfig file.

  2. On Windows this is usually located in your Users folder.

    Example: If your username was Bob, your .gitconfig should be in: C:\Users\Bob.gitconfig

  3. If this file doesn't exist, you need to create it and fill it out as followed:

  4. (fill in the name and email part and save)

    [user]
        name = {NAME}
        email = {EMAIL}

See also: https://help.github.com/articles/caching-your-github-password-in-git/


You can also use a git GUI package: git-control. It is easier to use and there is a small display of auto generated git commands, which is very helpful for beginners to get a good idea about git and version control.

git control package from Atom.io