As of 2015, GitHub reports having more than 9 million users and more than 21.1 million repositories, making it the largest code host in the world. Developers use GitHub to learn about new technologies, contribute to open source projects, collaborate on internal projects, and much, much more.
At OSCON last month, Brent Beer of GitHub’s sales engineering team gave a packed talk full of fascinating, useful tips called Everything I Wish I Knew When I Started Using GitHub.
There were tons of great takeaways from Brent’s session, but here are seven of my favorite GitHub tips:
1. Support for Subversion
GitHub repositories can be accessed from both Git and Subversion (SVN) clients. The command
git-svn provides a two-way bridge between Git and SVN. Read more in the Pro Git book.
2. You can revert a pull request (PR)
When you merge a feature in with a pull request, and you need to undo it quickly, you can click Revert to open a new pull request that is an undo for the entire previous feature. More details are on GitHub Help.
3. The blame game
A terrible name, but a terribly useful feature. Use it to find the list of changes in a file and who made them. Click the Blame button in the upper-right tab list to quickly find out who last worked on the file. Or, type
Git blame [filename] at the command line.
4. Is my code licensed?
Opting out of open source licenses doesn’t mean you’re opting out of copyright law. Learn about licensing and how to license your code at choosealicense.com.
5. Not just code
GitHub can save and render images, 3D (STL) files, and PDFs as well as code. When looking at a commit or set of changes that includes an STL file, GitHub displays the changes. Use the Revision Slider option to see the diffs transition between the current and previous revisions.
6. Closer than Bit.ly
Ever wish you had a smaller URL to share with your coworkers? http://git.io provides a URL shortener for your GitHub repos.
7. Quick, I need my pic
If you ever need quick access to your profile picture, you can access it at github.com/[profilename].png
Brent did a great job sharing his GitHub hints so you don’t have to learn them the hard way. To see his full list of tips you can click through his slides here.
Now go work on your code portfolio.
3D rendering courtesy of Brent Beer.
The views expressed on this blog are those of the author and do not necessarily reflect the views of New Relic. Any solutions offered by the author are environment-specific and not part of the commercial solutions or support offered by New Relic. Please join us exclusively at the Explorers Hub (discuss.newrelic.com) for questions and support related to this blog post. This blog may contain links to content on third-party sites. By providing such links, New Relic does not adopt, guarantee, approve or endorse the information, views or products available on such sites.