Binary files in a linear repository

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hello all,

currently I'm planning a frontend tool which makes use of only a small subset of git. The repo's contents is all binary (think of pictures). Accordingly, I can't merge in a meaningful way, making branches of very limited use.

The situation I'm trying to solve is:

- A revision earlier than the latest one is checked out.

- Files of this earlier commit are modified.

- I want to record this earlier commit along with it's modifications as a new commit on top of master, ignoring intermediate commits:

com005  <-- master
com004
com003  <-- HEAD, files modified
com002
com001 (initial commit)

One solution to do this is to move all files somewhere else, check out master, deleting all checked out files, placing the moved away files back into place and committing the result as com006. Obviously, this is a pretty complex operation, just waiting to exploit coding mistakes. Additionally, this will be slow.

Now I'm thinking about a much simpler solution: Simply declare the current set of files as (a modified) master/com005 and commit them. A "cp $GIT_DIR/master $GIT_DIR/HEAD" followed by a commit would do it.

Now my question: Is it safe to tweak the files in $GIT_DIR this way or will this corrupt the repository?


Thanks for any opinions,
Markus




--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]