~/git/git-repository-helpful-shortcuts.md

Git shortcuts - Helpful shortcuts for git users

2 min readMay 30, 2019by Gorav Singal#git#github#github-shortcuts
// 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

$ subscribe --weekly

One deep dive a week, in your inbox

System design, AI engineering, trading systems and interview prep. Tested code, real numbers. Free, and you can unsubscribe any time.

or read it on gyanbyte.substack.com

Share

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

How to Stay Valuable as a Software Engineer in the AI Era: A Practical Playbook

How to Stay Valuable as a Software Engineer in the AI Era: A Practical Playbook

In the previous article I argued that AI is not killing software engineering…

How to Review AI-Generated Code: A Checklist for Catching What the Model Missed

How to Review AI-Generated Code: A Checklist for Catching What the Model Missed

A few months back I approved a PR that was almost entirely AI-generated. It…

How to Debug AI-Generated Code: Understand First, Fix Last

How to Debug AI-Generated Code: Understand First, Fix Last

In the last article I wrote about reviewing AI code before it goes in. This one…

The Future of Software Engineering: What AI Changes, What Stays, and Where the Jobs Go

The Future of Software Engineering: What AI Changes, What Stays, and Where the Jobs Go

Every few weeks somebody sends me a scary headline — “AI will replace all…

The Transactional Outbox Pattern: Never Lose an Event Again

The Transactional Outbox Pattern: Never Lose an Event Again

This is one of those patterns that looks like nothing until you get burnt once…

Event Sourcing, Explained: Store What Happened, Not Just the Final State

Event Sourcing, Explained: Store What Happened, Not Just the Final State

Here is a question I like to ask in interviews: your bank account shows a…