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:

  • Diff tool in SourceTree
  • Source Tree and Github not seeing all of my files
  • github, sourcetree getting unauthorized error
  • Unknown SSL protocol error in connection
  • Retrieve deleted stash in Git using SourceTree
  • Can't add files to staging area in git due to case sensitivity
  • enter image description here

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

  • Version control of xslx using gitlab
  • Source Control for Everyone?
  • Eclipse keeps re-checking my git repositories. How do I turn this off or change the interval?
  • Auorefresh git log after commit when running in the Terminal
  • Code formatting before commit to GIT
  • git push to remote master 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.