diff --git a/README.md b/README.md index f934fe3..438b1be 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,7 @@ All commands should work for at least git version 2.13.0. See the [git website]( - [I want to set a global user](#i-want-to-set-a-global-user) - [I want to add command line coloring for Git](#i-want-to-add-command-line-coloring-for-git) - [I've no idea what I did wrong](#ive-no-idea-what-i-did-wrong) + - [Git Shortcuts](#git-shortcuts) - [Other Resources](#other-resources) - [Books](#books) - [Tutorials](#tutorials) @@ -1701,6 +1702,20 @@ Using `git reset` it is then possible to change master back to the commit it was (copied and edited from [Source](https://www.atlassian.com/git/tutorials/rewriting-history/git-reflog)). + +## Git Shortcuts + +Once you're comfortable with what the above commands are doing, you might want to create some shortcuts for Git Bash. This allows you to work a lot faster by doing complex tasks in really short commands. + +```sh +alias sq=squash + +function squash() { + git rebase -i HEAD~$1 +} +```` +copy those commands to your .bashrc or .bash_profile. + # Other Resources ## Books