GitHub tips
development, productivity, tipsGitHub's tagline 'Where the world builds software' may seem accurate on the surface, but it doesn't include so many of its users. GitHub is more than a hosted Git service. It has become a key destination for collaboration, not just for developers, but for anyone with content to share, whether that content is code, documentation, design artifacts, blogs, static sites, data sets, open government initiatives, and so much more. Here are some tips and tricks I've found useful.
Ignore whitespace #
There's a control in the UI to ignore whitespace, but I find it's often quicker / easier to just add ?w=1
to the URL.
Get patch output #
Add .patch
to a commit or Pull Request URL to get the changeset output as a patch. This can be useful for some projects where their workflow requires the submission of patches via a mailing list or similar.
Get raw diff #
Similar to the tip above, add .diff
to a commit or Pull Request URL to get the changeset output in diff format.
Avatars #
Get a user's avatar at https://github.com/<username>.png
.
Short URLs #
Profile README #
Create a repository with a name that matches your GitHub username. As long as the repository is public, the contents of its README.md will be displayed on your profile page.
Public keys #
Get a user's public keys by appending .keys
(SSH), or .gpg
to their profile URL.