Quantcast
Channel: Git push doesn't ignore files in .gitignore - Stack Overflow
Viewing all articles
Browse latest Browse all 5

Answer by kevininhe for Git push doesn't ignore files in .gitignore

$
0
0

Another option, following @AD7six answer, is to create a new branch with no history, so you can push this branch to the remote server ignoring completely the large file.

You can accomplish this by doing:

git checkout --orphan <name_you_choose_for_orphan_branch>git commit

And then push your changes with

git push <remote-name> <name_you_choose_for_orphan_branch>

Source: How can I purge all the history and push it


Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>