mirror of
https://github.com/k88hudson/git-flight-rules.git
synced 2025-03-10 12:48:43 -03:00
Git shortcuts (#261)
* I committed and pushed a merge that shouldn't have happened * git shortcuts * remove extra commands in git shortcut section
This commit is contained in:
parent
8b09e3fb58
commit
3d6c00dded
15
README.md
15
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 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 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)
|
- [I've no idea what I did wrong](#ive-no-idea-what-i-did-wrong)
|
||||||
|
- [Git Shortcuts](#git-shortcuts)
|
||||||
- [Other Resources](#other-resources)
|
- [Other Resources](#other-resources)
|
||||||
- [Books](#books)
|
- [Books](#books)
|
||||||
- [Tutorials](#tutorials)
|
- [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)).
|
(copied and edited from [Source](https://www.atlassian.com/git/tutorials/rewriting-history/git-reflog)).
|
||||||
|
|
||||||
|
<a name="git-shortcuts"></a>
|
||||||
|
## 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
|
# Other Resources
|
||||||
|
|
||||||
## Books
|
## Books
|
||||||
|
Loading…
x
Reference in New Issue
Block a user