From the terminal, run this:
git checkout master
git branch -m master main
git fetch
git branch --unset-upstream
git branch -u origin/main
A list of git aliases I use on my machines to make working with GitHub and GitLab a little bit faster.
For more information, see my Ruby command-line gem: emmahsax/git_helper.
alias gadd='git add -A'
alias gaddp='git add -p'
alias gcam='git commit -am'
Documentation to make it easier to debug linking to images, resources, CSS, and JS within a static site that's generated via Jekyll.
There are two files that I tend to use to fix up some screwed up git history. None of these files should be used on huge repositories where a lot of people have forks and clones. Running any of these files completely rewrites history and will change the git SHA of all of the later commits.
I've used this first file when I've accidentally committed a bunch of past commits with the wrong email (think work vs. personal emails). To use it:
git branch default_branch_backup
git checkout default_branch
email_switch.sh
This file live in the .circleci/
directory of your project, named config.yml
:
version: 2.1
jobs:
skip:
working_directory: ~/PROJECT_DIRECTORY # If we leave this out, the build will break with missing required arguments
docker: [ image: circleci/ruby:2.6.5 ] # This doesn't really matter, but just choose any docker image
This uses the pagination provided here. See the pagination in action at https://emmasax.com/blog/.
Let's start with the basics. Here's what the Jekyll _config.yml
should look like:
title: An Awesome Blog
description: My blog, which is awesome
url: https://an-awesome-blog.com
What this will do is generate a two different feeds:
feed.xml
for your local development, which will contain the values you specify for your development
environment in your _config.yml
.feed.xml
for your live site, which will have the values set in your _config.yml
for your production
environment.This is necessary because without different values for title, description, etc, many feed readers will view the two feeds as the same, even if the post content is different This makes it difficult to test if your feed is working and updating locally.
You could add additional environments as well, such as development
, test
, staging
, and production
.