You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
looks like the link provided is client side which means all users need to remember to set it up, which isn't ideal.
I also explored git hooks, .git/hook/update specifically since it runs server side. But to enable this you need to get the file on the server git repo and GitHub doesn't provide shell access.
The only idea I have currently is on the web server side, when I update the website I could process the list of updated files and use
for i in <updated files *.php>; do
author=`git log -1 --pretty=format:'%an' $i;
date=`git log -1 --pretty=format:'%ai' $i;
sed -i -e 's/\$Author\$/$Author: ${author} $/g $i;
sed -i -e 's/\$Date\$/$Date: ${date} $/g $i;
done
to get the author and date and injected it by hand at that point. Only down side is that we should a reset the git to only show $Date$ and $Author$ since it'll never update in the repo. And there would be a slight race condition, since to update a modified file I'd have to do a hard reset on the repo then update then loop and fix, during that time page loads would display 'Date' and 'Author' literally. Though with GitHub this might be the only and best option?
eed to add$Author$ and $Date$ convertions to git commit.
see https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes#Keyword-Expansion for examples
The text was updated successfully, but these errors were encountered: