Have you ever been asked what GitHub really is? I’d say it is like Wikipedia and Facebook for programmers. Combined. You can access, view and even edit files. Companies mainly use it to build software and web applications, whereas individuals use it to browse, find and share projects.
Many developers breathe GitHub. And that’s great. It’s the software that helps us (developers) to build great software.
Today I’m presenting you our GitHub tutorial. Here are 10 helpful GitHub hacks you probably don’t know.
Basically, GitHub projects can be made public and every publicly shared code is freely readable. You can have private projects as well, however, they require a paid GitHub plan. Public repositories on GitHub are often used to share open source software.
Clone like hell and learn
As mentioned GitHub offers a never-ending amount of free, open-source projects and code snippets. This basically means that you can use all that code for free.
Through cloning interesting projects, you can freely download the code to your local hard drive. Why? Because you may want to learn about coding styles and practices through looking at other people’s code. Especially when getting started in web development I’d recommend to check out other people’s code.
Who to follow on GitHub?
That brings me to the next tip which probably isn’t really a tip. GitHub is the largest community of developers in the world. This makes it really hard to decide on which one to follow and which one not. Here are a couple of ideas on how to find great/interesting people on GitHub:
- Assuming that people who have a huge follower base on GitHub are worth to follow, I’d recommend to search for users with more than 1.000 followers: https://github.com/search?o=desc&q=followers%3A%3E1000&ref=searchresults&s=followers&type=Users
- You can modify your search regarding specific languages:
- Search for repositories which have been starred a great number of times: https://github.com/search?o=desc&q=stars%3A%3E1000&ref=searchresults&s=stars&type=Repositories
Also make sure to check out this quora thread with interesting people to follow on GitHub.
We are using keyboard shortcuts for all different applications and use cases. So why not on GitHub.com as well? Press “?” on any GitHub page and get a list of shortcuts which can be applied to this particular page:
I especially found the following GitHub shortcuts quite useful:
- Press “s” for focusing on the search bar
- Press “gc” for switching to your code
- Press “gd” for switching to your dashboard
- “gi” for going to your issues
Commit early and often
Ever heard of the release early, release often paradigm of software engineering? Commits are updates to a project which refers to changes in one or more files. Every completed task should therefore result in a commit on GitHub (even before testing which is an own task itself).
Every completed task should therefore result in a commit on GitHub (even before testing which is an own task itself).
Comment your commits
While working on a project with a couple of colleagues or friends you can easily make a mess by not commenting your commits. Make sure to comment every commit in order to keep your version control clean and easy-to-follow.
Especially if you’re working on public projects, which might be cloned by someone else, comments are key to get an overview.
The more people work on a project, the more complex it gets. Make use of the following filters to find certain commits easier:
- Filter commits by certain authors by adding “?author=githubhandle” to the URL in the commit view.
You can also create a compare view for your repository by adding the “compare” to your URL:
You can – for example compare two branches – and also take time into consideration (if you’d like to compare the current state of the branch with the same one 7 days ago.
Trace changes in a file with Git blame
I’m not sure why they named this awesome feature “blame”. But despite it’s name, git blame is pretty cool. It’s an super easy way to display changes of any file. Simply click on the blame button in the code view in order to get an overview on all changes which have been made.
Send line links
Did you know that you share links to a certain code line (or multiple lines)? Simply select the line in the code view and you’ll see how the URL will change. You can even select multiple lines by pressing “SHIFT”.
Use GitHub for more than coding
Version control is great not only for coding, but also for other tasks too. Whether you’re working on some website project or just hosting some documentation. GitHub does a great job and makes life easier – for developers, designers and project managers.
- Keep track of your design process
- Keep track of your content history on any project
We’ve recently launched bugtrackers.io and used GitHub in combination with other great services like Codeship and DIVSHOT. Check out what we’ve learned from that.
GitHub Issues is a great way for managing your tasks, issues and bugs on any project. GitHub Issues is a great bug tracker – especially if you’re already using GitHub for your very own projects. The awesome thing about GitHub Issues is that you can collaborate with colleagues and friends on your reported bugs in order to get them fixed.
A bug report in GitHub Issues basically consists of a title, description, milestone and assignee (who’s responsible for fixing the bug).
Also make sure to check out this guide on how to use GitHub Issues.
Get more out of GitHub Issues with Usersnap
Another great thing about GitHub is it’s integration possibilities with other awesome services. I therefore recommend to take a look at github.com/integrations and check out the available integration possibilities with tools (you might be already using).
By connecting Usersnap with GitHub Issues you can make your bug reporting and testing efforts much more pleasant. Screenshots created by your colleagues, testers, website visitors or clients are automatically (or manually if you want) sent to your GitHub Issues.
GitHub is not only the largest developer community available, but also a super-powerful tool for bringing your programming skills on the next level.
I hope you enjoyed our first GitHub tutorial. What are your favourite GitHub hacks? Any additional tips for being more productive?
PS: We’ve updated and published the presentation with these helpful GitHub tricks on Slideshare. You can view & download the presentation.
If you found this post interesting, follow us on twitter where we tweet about web development, web design and startups.
This article was brought to you by Usersnap – a visual bug tracking and screenshot tool for every web project.
15 inspirational podcasts for everyone working in web development
Since there are many resources out there for getting started in web development, having some truly inspiring web development podcasts in your bookmarks is a great way to learn. It’s the most portable way to consume content and to learn something new in web development. In this post, we’ve collected a list of the most…
Be more productive with these four product updates from Usersnap
Before Christmas we let the biggest feature since launching Usersnap – the new dashboard Search – fly free. And now there’s more to come! Have a look at the latest improvements with 4 awesome new product updates.
Get started in web development today. With these 9 basic tips everyone should know.
I have recently published a piece on “what no one tells you about working in web development” in which I shared some insights on how working on web development projects, well, works. Starting out in web development can be quite difficult, but it is a worthwhile adventure if well prepared. Here’s my web development tutorial…
Free & great wireframe tools for web designers & developers!
Usersnap is great for bug tracking. And that’s the core feature of our Usersnap widget. However there’s a time when ideas are brought to paper and web teams discuss about mockups and first scribbles. We know that, because a lot of users tell us about their web development and web design workflows. Unfortunately the coordination…
Streamline your client approval process
Let clients draw directly in the browser.
Fix bugs in minutes with screenshot & metadata.
Trusted by 1000+ customers worldwide.