junegunn / fzf-git.sh

bash and zsh key bindings for Git objects, powered by fzf
612 stars 53 forks source link

Option to configure git-dir and work-tree #38

Closed ragu-manjegowda closed 6 months ago

ragu-manjegowda commented 6 months ago

Thanks for the amazing work!

I want to use this with the dotfiles for which I have and alias config which runs git with preset git-dir and work-tree.

I am looking for options to somehow use this program with dotfiles.

I can think of passing GIT_COMMAND to the functions and have another key bind say ALT-G{KEY}.

Let me know your thoughts.

ragu-manjegowda commented 6 months ago

Nevermind, I was able to get this with custom functions shown in README.

cgch() {
  GIT_DIR="$HOME/your_git_dir" WORK_TREE="$HOME" _fzf_git_hashes
}

Closing.