Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When not in git directory: "fatal: --local can only be used inside a git repository" #6491

Closed
stationstops opened this issue Dec 13, 2017 · 10 comments
Labels
Resolution: not our issue Issue or pull request not related to Oh My Zsh

Comments

@stationstops
Copy link

Whenever I press enter in a non-repo directory, I get the error:
"fatal: --local can only be used inside a git repository"

Teammates with same setup also have the issue:

oh-my-git: latest as of posting fd13327094d0ff2db3d713f21942f0419acb1dfb
oh-my-zsh: latest as of posting a7fb55c
OS: MacOS Sierra 10.12.6
git version 2.15.1
zsh 5.2 (x86_64-apple-darwin16.0)

arialdomartini/oh-my-git#109 (comment)

This issue fix was merged in oh-my-git (Im not sure how that dependency works for oh-my-zsh), but didn't solve the problem for me. Couldn't find equally relevant code in oh-my-zsh.

@adambene
Copy link

adambene commented Jan 4, 2018

same here

@albertplaya
Copy link

same here!

@Shea690901
Copy link

Look at all your plugins and look which one is calling git config --local ..., than look which one doesn't send it's stderr into nirvana (2> /dev/null or even > /dev/null 2>&1) and then you know were your error comes from...

@twodiefor
Copy link

Still there. But, based on @Shea690901's comment, in file '~/.oh-my-git/base.sh' change the line local enabled='git config --local --get oh-my-git.enabled' to local enabled='git config --local --get oh-my-git.enabled 2> /dev/null'

@stationstops
Copy link
Author

thx - but didnt work for me twodiefor

@mcornella
Copy link
Member

There is no code in OMZ that runs git config --local. If you have oh-my-git updated make sure that your zshrc file reflects that. I can't tell you anything else.

@stationstops
Copy link
Author

I literally just fixed this by simply running:
'antigen update arialdomartini/oh-my-git'

...not sure when the fix was actually pushed, as this didn't fix the issue previously....

@adambene
Copy link

@stationstops miracle happened for me as well...

@jpchavat
Copy link

Here is the commit that fixed the issue: arialdomartini/oh-my-git@a9fefe3

@jessicatrettin
Copy link

@

@mcornella mcornella added the Resolution: not our issue Issue or pull request not related to Oh My Zsh label Oct 5, 2021
@ohmyzsh ohmyzsh locked as off-topic and limited conversation to collaborators Oct 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: not our issue Issue or pull request not related to Oh My Zsh
Projects
None yet
Development

No branches or pull requests

8 participants