Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggest do not use git diff #4

tcitry opened this issue Mar 29, 2019 · 1 comment


Copy link

@tcitry tcitry commented Mar 29, 2019

Refer to your code

When I add new post or new image and run hugo, new file generated to public/, but it is not existed in target_repo(build/), so git diff --exist-code can not diff anything and exit with 0.

In my opinion, don't clone the target_repo, directly run

rm -rf .git
cd public
git init
git add .
git commit -m 'Auto build'
git remote add origin $TARGET_REPO
git push -f origin master

if nothing to commit, git will exit itself. and the code in public has not worthy to keep in git


This comment has been minimized.

Copy link

@benmatselby benmatselby commented Aug 29, 2019

Apologies @tcitry I totally missed this issue.. I'm aware of it now, thank you for raising this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.