List all Git aliases
Did you set up a lot of Git aliases and forgot what they are? List them all with this command.
The Git snippet collection contains a variety of short tips and tricks for all currently maintained versions of git. It includes most commonly-used commands and covers various use-cases in the form of simplified documentation, complete with multiple examples.
Did you set up a lot of Git aliases and forgot what they are? List them all with this command.
Learn how to push and pull changes between local and remote repositories.
Learn how to quickly and easily reset your local master
branch to match the one on the remote.
Did you make a mistake but haven't pushed your changes yet? Learn how to rewind back to a specific commit in Git.
Git submodules are a powerful feature that often trips up developers. Fret not, this guide will help you understand the basics.
Learn the simple way to undo a commit in Git without rewriting history.
Learn how to view a short summary of your Git commits using git log.
Learn how to view the last commit in Git using the git log
command.
Is your Git repository getting bloated? Optimize it by garbage collecting loose objects.
Learn how to eliminate the annoyance of copying dollar signs ($) along with terminal commands from the web with a simple bash alias.
Effortlessly create upstream branches on push by enabling a simple git config setting.
Ever needed to create a git commit with a different date? Here's a quick and easy way to do it.
Configure user information for Git to associate commits with a user.
Learn how to fetch the latest changes from the remote repository in Git and keep your local repository up to date.
Manually or automatically find which commit in history introduced a bug using.
Learn how to apply changes introduced by one or more commits to your current branch (cherry-picking).
Learn how to configure the text editor used by Git for commit messages and other text editing tasks.
If you need to copy a file from another branch to the current branch, here's an easy way to do it.
Performs an interactive rebase.
Learn how to effortlessly amend the last commit's message or contents using Git and fix any mistakes you might have made.
Learn how to view the current status of the working tree in Git.
The first step to working with a Git repository is often to clone it to your local machine.
Learn how to create a new commit in Git, along with tricks to skip Git hooks and create empty commits.
Made a mistake with your branch name? Learn how to rename a local or remote Git branch.