Thursday, March 17, 2016

7 essential new GitHub features of Early 2016

GitHub's developer team has been very active in the last few weeks, introducing a number of features that could save you a lot of time during your day-to-day GitHub activities. Let's take a look at the most essential new features, which make it easier for you to perform code reviews, upload files to your repositories, and interact with other users.

1. More code review tools

The latest update on GitHub saw the addition of a bunch of new features to make code review faster and more flexible. For example, not all teams review code the same way: Some teams may review changes in a pull request all at once, whereas others prefer to go through each commit one-by-one. For teams using the latter style, you can now select the commit you want to focus on from the review bar:

It's now also possible to focus on certain file types in a pull request. This makes working with large pull requests easier: For example, if you're the Python expert, you might want to focus just on .py files and ignore any changes made to .html and .css files. The new "Jump to File" bar lets you filter code either by file extension or file name:

Another useful addition is a timeline indicator that will highlight the new changes that have occured after you have last reviewed a pull request:

2. Add Reactions to Pull Requests, Issues, and Comments

While it has been possible to include emoji's in your GitHub responses for a while, using them as reactions often makes threads unnecessarily long and chaotic. That's why GitHub has introduced Reactions on all conversations to help users express their feelings more simply and effectively. This works on on all issues and pull requests, making it easy to +1 or :heart: a comment.

3. Upload files to your repositories

For those of you weary of the command line (how dare you!! jk), you can now upload files to your repositories directly from your browser. At the top of the file tree, click on "Upload files" and select the files you want to upload, or simply drag-and-drop files from your desktop onto the file tree. Once you've added all the files you want to upload, you can commit them directly to your default branch or create a new branch and open a pull request:

4. GitHub Pages now faster and simpler with Jekyll 3.0

GitHub Pages is now running the latest major version of Jekyll, Jekyll 3.0, and from now on will only support kramdown, Jekyll's default Markdown engine. Also, Rouge will be the only supported syntax highlighter going forward, which means that you no longer need to install Python and Pygments to preview your site locally.

Jekyll 3.0 offers several improvements for previewing and optimizing your site locally. For one, local builds are significantly faster, meaning you can preview your changes in near real time, and with incremental regeneration support (experimental), builds can be even faster still.

Two words of caution, too. First, Jekyll no longer supports relative permalinks. This has been the default since Jekyll 2.0, and is only an issue if you explicitly added relative_permalinks: true to your site's configuration. Second, GitHub Pages will no longer support Textile. If you are currently using Textile (Redcloth) to author your Jekyll site, you'll need to convert your site to use Markdown instead.

5. Issue and Pull Request templates

If your open-source project gets a lot of ill-formatted pull requests, or people keep forgetting to specify the platform they're using when reporting bugs, you can now add templates for Issues and Pull Requests to projects. This template will show up whenever someone opens up an Issue or Pull Request, thus helping contributors add the right details at the start of a thread:

To add an Issue template to a repository create a file called ISSUE_TEMPLATE in the root directory. A file extension is optional, but Markdown files (.md) are supported. Markdown support makes it easy to add things like headings, links, @-mentions, and task lists to your templates. Pull Request templates follows the same pattern: add a file called PULL_REQUEST_TEMPLATE to the root directory of your repository. You can also put these files in a .github/ folder if you don't want them in your root directory.

6. Migrate your code with the GitHub Importer

If you have source code in Subversion, Mercurial, Team Foundation Server, or another Git repository, you can now quickly and easily move that code to GitHub with the GitHub Importer. It will move your code and then notify you (via email or in your browser) when your newly populated GitHub repository is ready for action.

You can access the GitHub Importer directly from, or you can use the import feature to migrate your code when you create a new repository on GitHub.

7. Improved commenting with Markdown

Lastly, formatting Markdown has just gotten a lot easier. A new Markdown text-formatting toolbar includes a limited set of tools that gets out of the way of experts, but helps those new to GitHub to write just as clearly, and expressively as anyone else. In addition to standard Markdown formatting, the toolbar also includes GitHub-specific features. @mentions bring additional users or teams into the conversation, issue and pull request links allow you to cross-reference related discussions, and task lists track outstanding tasks:

For all new GitHub features, check out GitHub's own blog.