{"id":24443544,"url":"https://github.com/cynic-net/git-commit-filetree","last_synced_at":"2026-04-18T13:33:24.526Z","repository":{"id":35759003,"uuid":"40038354","full_name":"cynic-net/git-commit-filetree","owner":"cynic-net","description":"git-commit-filetree commits an arbitrary tree of files to a branch in a git repository.","archived":false,"fork":false,"pushed_at":"2020-01-28T10:42:57.000Z","size":53,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-14T11:27:33.413Z","etag":null,"topics":["git","git-commit","git-workflow","hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cynic-net.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-01T06:55:42.000Z","updated_at":"2025-09-17T11:32:28.000Z","dependencies_parsed_at":"2022-08-20T22:30:57.119Z","dependency_job_id":null,"html_url":"https://github.com/cynic-net/git-commit-filetree","commit_stats":null,"previous_names":["cjs-cynic-net/git-commit-filetree"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/cynic-net/git-commit-filetree","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cynic-net%2Fgit-commit-filetree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cynic-net%2Fgit-commit-filetree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cynic-net%2Fgit-commit-filetree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cynic-net%2Fgit-commit-filetree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cynic-net","download_url":"https://codeload.github.com/cynic-net/git-commit-filetree/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cynic-net%2Fgit-commit-filetree/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31971488,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","git-commit","git-workflow","hacktoberfest"],"created_at":"2025-01-20T22:16:06.981Z","updated_at":"2026-04-18T13:33:24.507Z","avatar_url":"https://github.com/cynic-net.png","language":"Shell","readme":"git-commit-filetree\n===================\n\nOverview\n--------\n\n`git-commit-filetree` is a git command that takes an arbitrary tree\nof files (typically not part of a Git repository's working copy) and\ncommits that tree to the tip of a given branch. It can be run as a\nstandalone script or installed as a git subcommand.\n\nUsage: `git commit-filetree \u003cbranch\u003e \u003cpath\u003e`\n\n### Motivation\n\nThis command allows you to do builds on one branch of a repo and then\ncommit the build output to a separate branch of the same repo. This\navoids making a second clone of the repo with its own working copy,\ndoing the commit there, and then moving the new commit from the second\nrepo to the first.\n\n### Usage with GitHub Pages\n\nA classic use case is when you're using your own build system to\ncreate a static website to be hosted on [`github.io`]. The procedure\nis as follows:\n\n* Check out your repo's `master` branch (or whichever branch contains your\n  source code and build system).\n* Build your site into an output directory (e.g., `./_site`).\n* Run `git commit-filetree gh-pages ./_site`. This will update the `gh-pages`\n  branch with the new version of the site under the `./_site` directory.\n* `git push --all` to upload your latest source and generated site to Github.\n* Github.io will start serving the new version of the site from the\n  `gh-pages` branch.\n\n\nMissing Features\n----------------\n\nThe following features are still missing from this version of the\nprogram.\n\n* Update the reflog after doing the commit.\n* Add the ability to specify a commit message.\n  (This should allow a token to substitute the current HEAD commit at\n  the time git-commit-filetree was run, e.g., `%h`.)\n* Manual page.\n\n\nInstallation and Invocation\n---------------------------\n\nThe script can be invoked in one of two ways. In both cases,\nyou'll need to ensure that the executable bit is set.\n\n* Directly from the command line. E.g.,\n  `path/to/git-commit-filetree mybranch myfiles`.\n* Copy the script to any directory in your path and invoke it through\n  `git commit-filetree mybranch myfiles`.\n\nThe second method will allow you to use `git` options before the\n`commit-filetree` command, such as `-C`, `--git-dir`, `--work-tree`,\nand so on.\n\n#### Fast-forwarding to Tracking Branch Head\n\nIf the release branch to which you're committing has a tracking branch,\nthe local branch will first be fast-forwarded to the head of that\ntracking branch before the commit is made. This is almost invariably\nthe desired behaviour: if someone else has released new versions on\nthe release branch you want to continue that history rather than\ndiverging. (I.e., you want the `fetch`/`git-commit-filetree`/`push`\nsequence to Just Work without having to do any other manipulation of\nthe release branch.)\n\nIf your release branch has diverged from its tracking branch,\n`git-commit-filetree` will currently print an error and refuse to\ncommit, and you will need to manually resolve the divergence. If you\nwish to be able to commit on a divergent local branch, you can modify\nthe script not to generate this error. If there's sufficient demand, a\ncommand-line option could be added to toggle this behaviour.\n\n### Usage with Windows\n\nThe standard Git installation for Windows includes the Bash shell, and\nso it appears that Windows has everything necessary to run this command.\nHowever, we've not tried it. If you wish to get it working, we would\nappreciate any feedback you could offer.\n\n\nTesting\n-------\n\nThe test framework uses shell scripts that generate output conforming to\nthe [TAP Specification](https://testanything.org/tap-specification.html).\n\nThe top-level `Test` script will run the tests using perl's `prove`\nprogram, which is part of the standard install on most GNU/Linux\nsystems. However, you should be able to use other TAP test harnesses\ninstead. If you have any difficulty, please feel free to contact the\nauthors for help.\n\nAs a side note, this hacked-together testing framework has probably\nbeen taken about as far as it reasonably can. If much more functionality\nneeds to be added (to the program or the test framework), the framework\nprobably wants a rewrite in a better language like Python.\n\n\nAuthors and History\n-------------------\n\n* Curt J. Sampson \u003c\u003ccjs@cynic.net\u003e\u003e\n* Nishant Rodrigues \u003c\u003cnishantjr@gmail.com\u003e\u003e\n\ncjs and Nishant together came up with the general idea.\n\nNishant did the heavy lifting to figure out exactly how to use the\nGit plumbing to get the job done. (It turned out to be a little more\ncomplex than we'd thought due to Git's propensity to want to stage\nthings through an index file rather than just directly create a tree\nobject. Perhaps that's for performance reasons in the more general case\nof git use.)\n\ncjs wrote the test framework and tests, and the `git-commit-filetree`\ncommand framework (error handling, usage messages, etc.).\n\n\nCopying and Usage\n-----------------\n\n![CC0](http://i.creativecommons.org/p/zero/1.0/88x31.png)\nTo the extent possible under law,\n\u003ca rel=\"dct:publisher\"\n    href=\"https://github.com/cjs-cynic-net/git-commit-filetree\"\u003e\n    \u003cspan property=\"dct:title\"\u003eCurt J. Sampson and Nishant Rodrigues\u003c/span\u003e\u003c/a\u003e\nhave waived all copyright and related or neighboring rights to\n\u003cspan property=\"dct:title\"\u003egit-commit-filetree\u003c/span\u003e.\nThis work is published from:\n\u003cspan property=\"vcard:Country\" datatype=\"dct:ISO3166\"\ncontent=\"JP\" about=\"https://github.com/cjs-cynic-net/git-commit-filetree\"\u003e\nJapan\u003c/span\u003e.\n\n### Attribution\n\nThough attribution is not required, we would appreciate it\nif, should you use this code in your own works, you name\nthe authors and provide a link back to the [original source\nrepository](https://github.com/cynic-net/git-commit-filetree).\n\n### Further Information\n\nSee the `COPYING` file in this repository for complete information. To\nsumarize:\n\nThe authors have with this deed has dedicated the work to the public\ndomain by waiving all of their rights to the work worldwide under\ncopyright law, including all related and neighboring rights, to the\nextent allowed by law.\n\nYou can copy, modify, distribute and perform the work, even for\ncommercial purposes, all without asking permission. However:\n\n* In no way are the patent or trademark rights of any person affected by\n  CC0, nor are the rights that other persons may have in the work or in\n  how the work is used, such as publicity or privacy rights.\n\n* We who associated our work with this deed make no warranties about\n  the work, and disclaim liability for all uses of the work, to the\n  fullest extent permitted by applicable law.\n\n* When using or citing the work, you should not imply endorsement by the\n  authors.\n\n\n\n\u003c!--------------------------------------------------------------------\u003e\n[`github.io`]: https://help.github.com/categories/github-pages-basics/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcynic-net%2Fgit-commit-filetree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcynic-net%2Fgit-commit-filetree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcynic-net%2Fgit-commit-filetree/lists"}