Skip to content

Commit

Permalink
Added git-root command
Browse files Browse the repository at this point in the history
  • Loading branch information
wjtk committed Nov 15, 2014
1 parent 5da2f89 commit 62688fd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ git_prompt ()
# Thy holy prompt.
PROMPT_COMMAND='PS1="${c_user}\u${c_reset}@${c_user}\h${c_reset}:${c_path}\w${c_reset}$(git_prompt)\$ "'

# change working directory to root of repo
git-root() {
cd "$(git proot)"
}
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,7 @@ Inny sposób prezentacji wszystkich branchy - jeszcze bardziej szczegółowy

git branches

Zmiana aktywnego katalogu na główny katalog repozytorium (komenda basha)

git-root

4 changes: 4 additions & 0 deletions config
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@
# Check if any file in repo has whitespace errors
# As described in http://peter.eisentraut.org/blog/2014/11/04/checking-whitespace-with-git/
check-whitespace = !git diff-tree --check $(git hash-object -t tree /dev/null) HEAD

# for git-root command
proot = !pwd

[apply]
whitespace = nowarn
[core]
Expand Down

0 comments on commit 62688fd

Please sign in to comment.