Info Center has pages, examples, hints, and snippets on the various topics in the menu above. Explore and enjoy.


In my case, the error was just fatal: refusing to merge unrelated histories on every try, especially the first pull request after remotely adding a Git repository.

Using the --allow-unrelated-histories flag worked with a pull request in this way:

git pull origin branchname --allow-unrelated-histories

    remote: error: See http://git.io/iEPt8g for more information.
remote: error: File LUA/BrynMawrCollege/video.mp4 is 213.26 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
    
    git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch <file/dir>' HEAD

        resolved:
        git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch LUA/BrynMawrCollege/video.mp4' HEAD

you-just-committed-a-large-file-and-can-t-push-to-github

To clear the history of the master branch, we can do the operations of:

creating a clean temporary branch
add all files into the temporary branch and commit
delete the current master branch
rename the temporary branch to be the master branch
force push the master branch to the Git server
Because the new master branch has only one commit, after the master branch is
force pushed to the Git server, the master
branch’s history is “cleared”.

The commands are as follows, operating in a cloned repository.

            git checkout --orphan tmp-master # create a temporary branch
            git add -A # Add all files and commit them
            git commit -m 'Add files'
            git branch -D master # Deletes the master branch
            git branch -m master # Rename the current branch to master
            git push -f origin master # Force push master branch to Git server