bigH / git-fuzzy

interactive `git` with the help of `fzf`
MIT License
2.31k stars 42 forks source link

Make merge base more easily configurable per repo #8

Closed goodevilgenius closed 3 years ago

goodevilgenius commented 4 years ago

Almost every command in git fuzzy results in the following error when first installed:

fatal: ref refs/remotes/origin/HEAD is not a symbolic ref

Upon reviewing the README, I realized that this is configurable using an environment variable.

Using an environment variable requires this change to be made within the shell (or .bashrc, for example), and makes it very difficult to have it set differently for different repos.

I suggest instead using a git config value.

E.g.:

git config gf.remote upstream
git config gf.branch main

This allows you to have a single global value set, and then override it on a repo-specific basis. Additionaly, it keeps git configuration within git, rather than having it within the shell.

bigH commented 3 years ago

i agree that the git config values would be a better place to get these 🤦

in the meanwhile, you can set these project-specific settings here: https://github.com/bigH/git-fuzzy#project-specific-settings

this script simply gets sourced if you call git fuzzy from that directory.