I have a big repository with more than 300,000 commits. I wanna work just with recent commits. So, I used the following command:
echo "" > .git/info/grafts
But it does not work, since after that I ran git log, again it returned all the commits. The NEW-ROOT-SHA1 that I passed is also on master branch.