git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Repo with only one file
@ 2013-08-07  6:24 shawn wilson
  2013-08-07 10:43 ` Johannes Sixt
  0 siblings, 1 reply; 11+ messages in thread
From: shawn wilson @ 2013-08-07  6:24 UTC (permalink / raw)
  To: Git List

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.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-08-09 21:55 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-07  6:24 Repo with only one file shawn wilson
2013-08-07 10:43 ` Johannes Sixt
2013-08-07 21:07   ` shawn wilson
2013-08-08 21:11     ` Phil Hord
2013-08-09  6:25       ` Johannes Sixt
2013-08-09  6:33         ` shawn wilson
2013-08-09  6:50           ` Johannes Sixt
2013-08-09 10:03             ` shawn wilson
2013-08-09 10:32               ` Johannes Sixt
2013-08-09 21:54                 ` shawn wilson
2013-08-09 15:00               ` Phil Hord

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).