i want make build script posts images imgur , updates markdown file. want wiki page literal .md file repo. possible? best can figure out have wiki page links .md file.
[link actual wikipage](https://github.com/.../somefile.md)
this link don't want follow.
any ideas appreciated.
this achievable without submodules.
as been said, github wiki repository itself. can cloned , pushed , else. edit of wiki-file commit.
literal .md file repo.
if .md
doesn't have file main repo (and don't see why has to), can generate local wiki repository, commit , push. if indeed has in main, can checkout single file.
making local clone of wiki repository
#the link on wiki page #do outside of main project directory git clone https://github.com/myname/myproject.wiki.git
only having .md
in wiki repo
the kiss principle in action.
#when images posted , new file contents generated cd /path/to/myproject.wiki git add somefile.md git commit -m'updated imgur files' git push
adding .md
main repo on local machine
this because takes no place in wiki repository. if file same , paths don't change, can make batch/shell script , run it.
cd /path/to/myproject.wiki # "use different working directory" magic git --work-tree=/path/to/myproject/main/repo add somefile.md #now it's in index (stage). git commit -m'updated imgur files' git push origin
checking out .md
main repo on github
this worst way, git fetch
downloads whole main repository wiki repository (not actual files, git internal files). takes disc space , internet bandwith. , it's ugly solution =)
cd /path/to/myproject.wiki git remote add mainrepo https://github.com/myname/myproject.git git fetch mainrepo #the "checkout 1 file" magic: git checkout mainrepo/master -- somefile.md #now it's in working directory. git add somefile.md git commit -m'updated imgur files' git push origin
Comments
Post a Comment