2

I had a repository on Github that I deleted and also locally. However, I cannot seem to git push; it gives me an error that says

Remote "origin" does not support the LFS locking API. Consider disabling it with:
$ git config 'lfs.Personal_Projects.git/info/lfs.locksverify' false
Counting objects: 203, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (193/193), done.
Writing objects: 100% (203/203), 15.24 MiB | 4.62 MiB/s, done.
Total 203 (delta 66), reused 1 (delta 0)
remote: Resolving deltas: 100% (66/66), done.
remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare repository
remote: is denied, because it will make the index and work tree inconsistent
remote: with what you pushed, and will require 'git reset --hard' to match
remote: the work tree to HEAD.
remote: 
remote: You can set the 'receive.denyCurrentBranch' configuration variable
remote: to 'ignore' or 'warn' in the remote repository to allow pushing into
remote: its current branch; however, this is not recommended unless you
remote: arranged to update its work tree to match what you pushed in some
remote: other way.
remote: 
remote: To squelch this message and still keep the default behaviour, set
remote: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
To Personal_Projects/
 ! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to 'Personal_Projects/'

I have already tried to look up each individual error but unable to fix it. Any new suggestions will be highly appreciated!

Also when I do git remote show, it results in giving me

Personal_Projects
origin

And I was wondering how I could get rid of Personal_Projects to where it accepts git push, git pull, etc.

This is not similar to the Git push error '[remote rejected] master -> master (branch is currently checked out)' – phd article as I have tried that solution a while ago.

Vrushali Raut
  • 1,130
  • 1
  • 10
  • 20
GoldenGenova
  • 54
  • 1
  • 6
  • `git remote remove Personal_Projects` will remove it from your list of remotes - however it looks like you might have some other problems here, unrelated to that remote. – match Jan 21 '18 at 16:14
  • Possible duplicate of [Git push error '\[remote rejected\] master -> master (branch is currently checked out)'](https://stackoverflow.com/questions/2816369/git-push-error-remote-rejected-master-master-branch-is-currently-checked) – phd Jan 21 '18 at 19:17
  • Please post the answer separately from the question. – merlin2011 Jan 21 '18 at 22:36

1 Answers1

1

Delete all local git files.

Clone files back.

Vrushali Raut
  • 1,130
  • 1
  • 10
  • 20
  • This is the answer that worked for the asker @GoldenGenova, according to [their edit to the question](https://stackoverflow.com/revisions/48368851/2). – Rory O'Kane Jan 22 '18 at 16:33