Skip to content

Commit

Permalink
Add cdgit function for returning to git project root
Browse files Browse the repository at this point in the history
  • Loading branch information
creichert committed Apr 29, 2019
1 parent 5a50246 commit 04225bf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bash/.bash_functions
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
# are specific to my workflow, and is loaded from ~/.bashrc.


function cdgit() {
cd "$(git rev-parse --show-toplevel)" || return 1
}

function git_delete_merged_branches() {
git remote prune origin
git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d
Expand Down

0 comments on commit 04225bf

Please sign in to comment.