Thursday, December 29, 2016

Top 10 new GitHub features of 2016

As 2016 comes to a close, let's have a look at the best features that the GitHub developer team has introduced this year, ranging from improved code review tools to fixing merge conflicts directly in your browser.


10. Two-factor authentication

Organization administrators can now require two-factor authentication for all members—making it easier to support security policies. Admins will be asked to confirm the two-factor authentication requirement and a confirmation modal will list members and forks that will be removed as a result. GitHub will notify members if they’re being removed from an organization with email and in-product notifications.

9. Pin repositories to your GitHub profile

You can now showcase the repositories that best represent your work on your GitHub profile. Using the "Pinned repositories" list, you can pin any public repository you have contributed to. Once you have chosen up to five repositories, you can then drag-and-drop to place them in whatever order you like.

8. Reorder issues within a milestone

Milestones and labels are a handy way to group and organize your issues, but sometimes it’s helpful to indicate which ones you or your team want to focus on first. You can now reorder issues and pull requests and indicate priority by moving them higher up or lower down the list.

7. 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:


6. 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.

5. 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 import.github.com, or you can use the import feature to migrate your code when you create a new repository on GitHub.

4. See what's behind your green squares

Your profile now contains your entire history of work on GitHub, from your first commit to your most recent pull request, and a per-repository breakdown reveals where you're spending your time each month. You can see special events in your history—the day you signed up for GitHub, opened your first pull request, or joined an organization—and showcase your best work by pinning favorite projects to your profile.

3. Publishing with GitHub Pages, now as easy as 1, 2, 3

Publishing a website or software documentation with GitHub Pages now requires far fewer steps—three to be exact:

  1. Create a repository (or navigate to an existing repository)
  2. Commit a Markdown file via the web interface, just like you would any other file
  3. Activate GitHub Pages via your repository's settings

And that's it—you now have a website. Of course, you can continue to control the look and feel by opting in to additional customizations (such as overriding the default theme with your own layouts or styles). While these changes shouldn't affect how most existing sites build, this post details some interesting gotchas for advanced Jekyll users.


2. Resolve simple merge conflicts on GitHub

One of the coolest new feature is that you can now resolve simple merge conflicts on GitHub right from your pull requests, saving you a trip to the command line and helping your team merge pull requests faster.

The new feature helps you resolve conflicts caused by competing line changes, like when people make different changes to the same line of the same file on different branches in your Git repository. You'll still have to resolve other, more complicated conflicts locally on the command line.

1. Completely overhauled code review tools

Perhaps this year's most noteworthy update was a complete overhaul of GitHub's code review tools. You can now request reviews, dismiss reviews, focus on certain file types, etc.—all designed 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:

You can now also request a review explicitly from collaborators, making it easier to specify who you'd like to review your pull request. You can also see a list of people who you are awaiting review from in the pull request page sidebar, as well as the status of reviews from those who have already left them.

To improve this workflow, pull request collaborators can now dismiss reviews. When someone leaves a review that requests changes, dismissing the review changes it from a review that requests changes to a review comment. This will unblock your pull request, freeing you up to merge it!

That's it for this year! What was your favorite feature of 2016? Let us know in the comment section below.