The github package brings Git and GitHub integration right inside Atom.
Most of the functionality lives in the Git and GitHub panel. There are different ways to access them, probably the most common way is through their keybindings:
Or you can also toggle the Git panel from the Status Bar by clicking on the changed files icon:
In case a project doesn't have a Git repository yet, you can create one from the Git panel.
To clone a repository, run the
GitHub: Clone command. In the dialog paste a URL of a repository and click "Clone". A new project will get added to the Tree View.
To open the branch tooltip, click the branch icon in the Status Bar. From there you can to create or switch branches.
After making some changes, stage anything you want to be part of the next commit. Choose between staging...
Use the Left or Right arrow key to switch between file list and the diff view. Unstaging can be done in the same way.
If you no longer want to keep some changes, you can discard them. It's similar to staging, but accessible behind a context menu.
Once you've staged your changes, enter a commit message. Feel free to describe the commit in more detail after leaving an empty line. Finalize by clicking the Commit button.
If you need more space, click the expand icon at the bottom right. It will open a commit editor in the center.
In case you forgot to commit a change and would like to add it to your previous commit, clicking the "Amend" checkbox. Now you can stage more changes or adjust the commit message.
When you're ready to share your changes with your team members, click the Push button in the Status Bar tooltip. If your local branch doesn't exist on the remote repository, Atom will offer to create a remote branch for you.
Click on the Fetch button to see if anyone made changes. Pull to get the changes into your local branch.
Sometimes there can be conflicts when trying to merge. Files that have merge conflicts will show up in the "Merge Conflicts" list. Click on a file to open the editor. There you can resolve the conflict by picking a version or make further edits. Once done, stage the file and commit.
If there is a Pull Request for your current branch, you can see its status in the "GitHub" panel. Click on Conversation to see the timeline.