I started writing this script in a repo I have called misc-scripts
where I just keep one off projects and the like (notes, throw away
scripts, etc). Well, my boss asked me to create a repo for one of
these scripts and I'd like to keep the commit history.

Ok, so:
% find -type f ! -iname "webban.pl" | while read f; do git
filter-branch -f --index-filter "git rm --cached --ignore-unmatch $f"
HEAD ; done

Which basically did it. But, I've got this one commit that seems to be
orphaned - it doesn't change any files. That is, it shows up in a git
log but not a git whatchanged. When I try to rebase -p --onto, I get
tons of conflicts, git adding blah in every other line of the file and
after I totally mess up the repo, that commit is still there. If I do
a git checkout and try to amend the message, I get:

# Not currently on any branch.
# Initial commit
# No changes
You asked to amend the most recent commit, but doing so would make
it empty. You can repeat your command with --allow-empty, or you can
remove the commit entirely with "git reset HEAD^".

iWhen I do --allow-empty, I can no longer see any other commits.

So, how do I remove this commit or what is the proper way to get this
one file into a repo with nothing else?

Also, I sign my commits and would like to keep each commit signed if
at all possible.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to