git|May 30, 2019|2 min read

Git shortcuts - Helpful shortcuts for git users

TL;DR

Learn keyboard shortcuts for GitHub's web interface including file search, code navigation, and other productivity-enhancing features for everyday repository use.

Git shortcuts - Helpful shortcuts for git users

Github is an awesome place of storing your code. Now, it also allows you to have private repositories for free. But, only projects in your personal account, not in your organization.

Github web view provides lot of shortcuts which increase your productivity. Here, I will list down only those shortcuts which are very useful:

1. Search Files in Github repository

Make sure you are in Code tab in your repository. There is a shortcut of going there as well. Look below in this post.

Press 't' button

This activates file finder. Now, start typing some name. As you type it will start searching. It will start showing the list of matching files in below area. And, you can select them using up and down arrow keys.

2. Switch to other branch or create new one

Press 'w' button

This will activates the Branches drop down, and you can start typing which branch you want to select. Or, you can create a new branch by typing a new name. Plus, you can also switch to a tag

First goto that file either by browsing, or by searching by pressing ‘t’ button. Now, when you have opened up a file.

Press 'y' button

The URL in browser expands to give you the direct link to this file. Note, you were already to the direct link of that file. But, that link will always to latest file in that branch. This link will give you always this file, which includes the commit id as well.

4. Search anything in repository

Press 's' or '/' button

You will goto search bar on top. Now start typing anything you want to search.

5. Goto Your Notifications

Press 'gn' i.e. first 'g', then 'n'

6. Goto Code tab

Press 'gc', i.e. first 'g' then 'c'

Similarly you can goto other tabs as well:

'gi' for Issues tab
'gp' for Pull requests tab
'gb' for Projects tab
'gw' for Wiki tab

Related Posts

A Practical Guide in understanding Git Branch and Conflict resolution during merge

A Practical Guide in understanding Git Branch and Conflict resolution during merge

Introduction In this guide, We will learn about branching, handling conflict…

A Practical Guide on Understanding Git Best Practices

A Practical Guide on Understanding Git Best Practices

Introduction In this post, we will learn about some of Best practices while…

A Practical Guide on how to work with Git Basic Commands and workflows

A Practical Guide on how to work with Git Basic Commands and workflows

Introduction In this guide, we will see git basic commands, and fundamentals of…

A Practical Guide on how to work with Git log command and history

A Practical Guide on how to work with Git log command and history

Introduction In this post, we will see ways to look at git history logs. For…

A Practical Guide on how to to create your own git command alias

A Practical Guide on how to to create your own git command alias

Introduction In this guide, We will learn on how to create some handy command…

A Practical Guide for better understanding Git Diff

A Practical Guide for better understanding Git Diff

Introduction In this guide, We will get basic understanding of various options…

Latest Posts

Claude Code Skills — Build a Better Engineering Workflow with AI-Powered Code Reviews, Security Scans, and More

Claude Code Skills — Build a Better Engineering Workflow with AI-Powered Code Reviews, Security Scans, and More

Most developers use Claude Code like a search engine — ask a question, get an…

Building an AI Voicebot for Visitor Check-In — A Practical Guide to Handling the Messy Parts

Building an AI Voicebot for Visitor Check-In — A Practical Guide to Handling the Messy Parts

Every office lobby has the same problem: a visitor walks in, nobody’s at the…

Server Security Best Practices — Complete Hardening Guide for Production Systems

Server Security Best Practices — Complete Hardening Guide for Production Systems

Every breach post-mortem tells the same story: an unpatched service, a…

Staff Engineer Study Plan for MAANG Interviews — The Complete 12-Week Roadmap

Staff Engineer Study Plan for MAANG Interviews — The Complete 12-Week Roadmap

If you’re a Senior Engineer (L5) preparing for Staff (L6+) roles at MAANG…

XSS and CSRF Explained — The Complete Guide with Real Attack Examples and Defenses

XSS and CSRF Explained — The Complete Guide with Real Attack Examples and Defenses

XSS and CSRF have been in the OWASP Top 10 for over a decade. They’re among the…

OWASP Top 10 (2021) — Every Vulnerability Explained with Code

OWASP Top 10 (2021) — Every Vulnerability Explained with Code

The OWASP Top 10 is the industry standard for web application security risks. If…