First time ever working with git and command line for github and I think I messed up pretty bad. I was using an older version of this repository: https://github.com/nielsenramon/chalk. I downloaded, played around, made my own thing. Then I decided to upload to GitHub. What happened was I had no idea what I was doing, so in Git Bash, I typed in git init
and then run/deploy
. Problem is, in the readme file of the version I'm working on, it told me:
Important note: Chalk does not support the standard way of Jekyll hosting on GitHub Pages. You need to deploy your working branch (can be any branch, for xxx.github.io users: use another branch than master) with the bin/deploy script. Reason for this is because Chalk uses Jekyll plugins that aren't supported by GitHub pages. The bin/deploy script will automatically build the entire project, then push it to the gh-pages branch of your repo. The script creates that branch for you so no need to create it yourself.
You can find more info on how to use the gh-pages branch and a custom domain here.
View this for more info about automated deployment with Circle CI.
Here is what it has in bin/deploy:
#!/usr/bin/env sh
# Run this script to deploy the app to Github Pages.
# Exit if any subcommand fails.
set -e
echo "Started deploying"
# Checkout gh-pages branch.
if [ `git branch | grep gh-pages` ]
then
git branch -D gh-pages
fi
git checkout -b gh-pages
# Build site.
yarn install --modules-folder ./_assets/yarn
bundle exec jekyll build
# Delete and move files.
find . -maxdepth 1 ! -name '_site' ! -name '.git' ! -name '.gitignore' -exec rm -rf {} \;
mv _site/* .
rm -R _site/
# Push to gh-pages.
git add -fA
git commit --allow-empty -m "$(git log -1 --pretty=%B) [ci skip]"
git push -f -q origin gh-pages
# Move back to previous branch.
git checkout -
yarn install --modules-folder ./_assets/yarn
echo "Deployed Successfully!"
exit 0
So when I ran run/deploy
, I got this error message back: https://pastebin.com/MZPGvstX
It also deleted a bunch of my files and I'm so confused as to what happened. I really hope I can at least recover it.