Chapter 2
IN THIS CHAPTER
Touring GitHub.com
Installing GitHub Desktop
Installing Atom
GitHub has a lot of features to offer new and returning coders. A good way to get acquainted with all those features is to explore the GitHub.com website. This chapter not only gives you that overview, but also guides you in setting up your local machine so that you can start building.
The home page of GitHub.com, shown in Figure 2-1, is a great starting point for many tasks, including starting your own project, learning about a topic, or exploring existing repositories.
The top menu bar, shown in Figure 2-2, is always available to you and is a direct link to the most important functions you need to perform.
Pull requests: The link to pull requests takes you to a list of all pull requests that you created, were assigned to complete, were mentioned in, or were asked to review. A pull request is a proposed change to the code of a repository. When first starting, you normally don’t have anything in this section, but as you start interacting with collaborative repositories, you get an overview of any tasks you may want to attend to. For more on pull requests, see Chapter 3.
If you click the Pull requests link, you might notice a ProTip, shown in Figure 2-3. The search bar for pull requests gives you several ways to specify a search to get exactly what you’re looking for. In fact, an entire page (https://help.github.com/articles/searching-issues-and-pull-requests
) is dedicated to effective searching. You can find ProTips throughout GitHub.com, so be sure to look out for them.
Your profile is a public view of, essentially, your portfolio. To view your profile, click your avatar and then choose Your profile from the menu that appears. You can see my profile in Figure 2-5.
The top menu bar of your profile offers quick links to your repositories, things you’ve starred, your followers, and anyone that you follow. Below that are repositories that you’re often visiting and your contribution graph. The contribution graph tracks how much code you’ve written per day. You can choose to include contributions to private repositories and an activity overview, which is a new feature.
GitHub Desktop is a free, open source application that makes it easier for Mac and Windows users alike to manage repositories and GitHub connections on their local computer.
The fact that Desktop is open source means that you can follow the development of new features, connect with the developers right on the actual repository where the application is being built, and even choose to add features you’re interested in having.
You can find the repository at https://github.com/desktop/desktop
.
To install the GitHub Desktop on your computer:
Go to https://desktop.github.com
and click Download for the platform you’re using.
This book is written with examples using Google Chrome and a Mac. GitHub Desktop works on a Windows PC as well because it’s built using Electron, which allows it to work on both operating systems.
After the download finishes, click the file that was downloaded.
The file automatically unzips.
On Mac, the GitHub Desktop application appears in your Downloads folder, next to the zip file. On Windows, the application immediately opens after you unzip the file.
On Mac, go to your Applications folder and double-click the GitHub Desktop icon.
The application opens, shown in Figure 2-6.
Before you can use GitHub Desktop effectively, you have to do a few things to connect it to your GitHub.com account. If you do not yet have a GitHub.com account, go to Chapter 1. If you already have a GitHub.com account and have already downloaded GitHub Desktop, you can set up GitHub Desktop with the following steps:
On the Accounts tab, click Sign In on the GitHub.com row.
The Sign In dialog box, shown in Figure 2-7, appears.
Type your username and password and click the Sign in button or click Sign in using your browser.
When you click Sign in, all the dialog boxes close.
Repeat Step 1 to re-open the preferences.
Your account with your avatar, name, and GitHub username appears under the GitHub.com row, confirming that you have successfully logged in.
Click on the Git tab.
The information has been auto-filled for you.
On the Appearance tab, choose Light or Dark.
Screenshots in this book are in Light mode.
Set other preferences, such as the Editor and usage data, on the Advanced tab.
This book uses Atom and Visual Studio Code as example editors, but you can select whichever editor you prefer.
I recommend agreeing to send usage data, which is checked by default. By leaving it checked, you help the GitHub Desktop development team understand how all users use the application and therefore make it better.
If you do not have a GitHub repository on your computer yet, you can stop the setup here. If you do have a repository, see Chapter 4.
Atom is a free, open-source editor. Just like GitHub Desktop, Atom is built on Electron, making it work on Mac or Windows PC. Atom is extensible, meaning you can add your own features to it.
You can take a look at what the Atom team at GitHub is working on by visiting the repository; https://github.com/atom/atom
.
Atom is a lightweight editor that shouldn’t take long to install. To install Atom, go to https://atom.io
and click Download.
Just like with GitHub Desktop in the previous section, when Atom finishes downloading, click to unzip the file. On Mac, the Atom application appears in your Downloads folder. Drag the Atom application into your applications folder. On Windows or Mac, double-click the application to open it. When you do, you should see what is shown in Figure 2-8.
Here are a few things that you should know about Atom:
Updates: Each time you start Atom, make sure you check the bottom- right corner to see whether any updates need to happen so that you keep your software as current as possible. When you click the Update link, the Settings tab opens, and the packages appear on the screen. In Figure 2-9, you can see that I had previously installed the package t eletype
, which requires an update. After clicking Update to 0.13.3 or Update All if I have multiple packages that need updating, we restart Atom.
You can click the Squirrel icon to go to the Atom About page to ensure that your Atom editor is also kept up-to-date.
Git and GitHub tabs: At the bottom, right, next to where the updates are, you can easily open the Git and GitHub tabs by choosing Packages ⇒ GitHub ⇒ Toggle Git/GitHub Tab.
You may notice that some menu items throughout Atom have keyboard bindings, such as the Git and GitHub tabs in Figure 2-10. Keyboard bindings are combinations of keys you can press on your keyboard to make something happen in a specific application. You probably already know some of these. For example, when you're browsing the Internet, you can type ⌘ -T on a Mac or Ctrl+T on Windows to open a new tab. Finding ways to become more efficient in your coding, such as by using keyboard bindings, can be an effective strategy for you as you become more expert in your coding journey.
https://atom.io/packages
. Going through each of these packages is beyond the scope of this book, but I encourage you to explore some and search them if you’re ever feeling limited by your Atom experience.3.21.100.34