From 1313ed78eef954d7950deb94dfaf888299199802 Mon Sep 17 00:00:00 2001 From: Nick Nisi Date: Fri, 4 May 2012 15:03:22 -0500 Subject: [PATCH] Renamed git/aliases.zsh to git/git.zsh + Added a function to the file to allow for easier renaming of files Changing the case of a filename is difficult in git because git does not track case-sensitivity changes to a filename. I added a function which simply does a `git mv` got a temporary file name and then does a `git mv` to the desired filename. --- git/{aliases.zsh => git.zsh} | 6 ++++++ 1 file changed, 6 insertions(+) rename git/{aliases.zsh => git.zsh} (79%) diff --git a/git/aliases.zsh b/git/git.zsh similarity index 79% rename from git/aliases.zsh rename to git/git.zsh index edfc45c..a0f2c2e 100644 --- a/git/aliases.zsh +++ b/git/git.zsh @@ -9,4 +9,10 @@ alias gs='git stash save' alias gsp='git stash pop' alias gmv='git mv' alias grm='git rm' +alias grn='git_rename' alias glog="git log --graph --pretty=format:'%Cred%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative" + +function git_rename() { + git mv $1 "${2}-" + git mv "${2}-" $2 +}