Git: Push local file to a different file name in a remote repository -
i'm working on specialized standalone server imageboards, , have local git repository folder development/testing folder. possible push local file repository different name? example, index.html.remote
(on local repo) index.html
(remote repo), since gochan uses template files generate html pages. create index.html
landing page first time installation, push that, , replace template-generated version , never push again, seems bit messy.
but having
index.html
when user first downloads betterindex.html.remote
, wouldn't it?
you can achieve that. version a:
- index.html.template
- a script generates right index.html (not versioned, private)
- a .gitattributes file in declare content filter driver called here "
smudge
" (a script runs ongit checkout
)
(picture chapter "git attributes" of git book)
echo 'index.html.template tpl' >> .gitattributes git config --global filter.tpl.smudge yourscript
that way, don't have push different files different remotes.
manage 1 file (a template file), , script generates right content depending on execution environment.
Comments
Post a Comment