This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using No External Gems | |
`git diff --name-only --cached`.split(/\n/) # Returns all files as array of relative paths |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
# adds everything and commits | |
ac = !git add -A && git commit | |
# adds everything and ammends it to the previous commit | |
amend = !git add -A && git commit --amend --no-edit | |
# pretty branch list | |
branches = for-each-ref --sort=-committerdate --format=\"%(color:blue)%(authordate:relative)\t%(color:red)%(authorname)\t%(color:white)%(color:bold)%(refname:short)\" refs/remotes | |
# creates a new local branch and sets it up with origin | |
create-branch = !sh -c 'git push origin HEAD:refs/heads/$1 && git fetch origin && git branch --track $1 origin/$1 && cd . && git checkout $1' - | |
# creates a local branch and removes it on origin |