Cannot PUSH recent commits to Github that have been pushed to Bitbucket

I have two remote repositories. One is private (Bitbucket) and the other public (Github). I had been pushing changes to Bitbucket using Github app and then pushing the same commit to Github repo using Xcode. However, recently I have been unable to PUSH the commits to Github and using SourceTree I get this error message:

This repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/pre-push.

This is how it looks from within SourceTree:

  • Error (internetKeychainItemForServer:withUsername:path:port:protocol:) - The specified item could not be found in the keychain
  • Source Tree and Github not seeing all of my files
  • 504 gateway timeout on GitLab HTTP URLs
  • Where is the source tree in Sourcetree?
  • Why doesn't the graph display a new branch branching off from the master branch, when I create a new branch in terminal?
  • git: 'credential-osxkeychain' is not a git command. See 'git --help'
  • enter image description here

    How can I get my Github repo to accept the most recent commits?

  • git describe: inexplicable commit count
  • What does the README.md file in git repo do?
  • Git reset to previous commit
  • how show the diff from my current working directory and my last commit?
  • git for important file backup - why not?
  • Overwriting and Pushing a Git Branch
  • 3 Solutions collect form web for “Cannot PUSH recent commits to Github that have been pushed to Bitbucket”

    You have a pre-push hook which is telling you that you have git-lfs (large file support) enabled for this repository, but that it can’t find the git-lfs program on your computer. The solution is to either remove the hook (which is located in .git/hooks/pre-push, as the error message says), or to fix your PATH so that it can find the git-lfs program.

    It would have been enough to say that the .git directory is in the original local directory of your repository and you probably need a program like TextWrangler or similar, that shows the hidden files starting with a dot, to be able to see it and delete it by moving it to the trash (right click mouse). It took me one hour to figure out this. I hope no one else have to waste that time.

    Here is the instructions for removing the pre-push file using Mac Terminal:
    First: cd to the directory that is your local repository for your project. (The main folder that holds .xcodeproj and other files) The .git file is hidden but you can still access it by typing cd .git/hooks in terminal. If you type ls in terminal to view all files within the current directory, you’ll notice the pre-push file. Type rm pre-push to remove the file. You should now be able to push to your remote repository. Just be sure to cd .. back a few times to your local directory for your project. Simple as that.

    Git Baby is a git and github fan, let's start git clone.