Posts tagged: git

All posts with the tag "git"

25 posts latest post 2026-05-06
Publishing rhythm
May 2026 | 1 posts

Master No More

It’s been a long time coming. We use some very harsh language within tech so much sometimes that we become numb to it. It’s time to do my very small part in this movement and purge this language from my active repos starting with this blog right here. Large Refactor At The Command Line this post follows my method of refactoring code bases from the command line, read more about that in this article. c-s-f # First off browsing through the content of my blog I found many references to master. I cannot completely whole-sale find and replace each one of them, because some of them are links that I do not own. Any set of instructions got upgraded from to There were countless cases of examples like this to comb through, but it feels good to have them purged of old language. rename routes # Following yesterdays post, I am going to rename my markdown files /static/_redirects shorteners # redirect posts # redirect external links to repo # More info on refactoring your blog routes with netlify her…
2 min read

008

compare _ branch to _ with ** cli

1 min

006

Setup ** for _

1 min

005

** setup is _

1 min

Today I learned git diff feature..main

Today I learned how to diff between two branches. Sometimes we get a little happy and mistakenly commit something that we just can’t figure out. This is a good way to figure out what the heck has changed on the current branch compared to any other branch. Example # Let’s create a new directory, initialize git and toss some content into a readme. After all of that, we have a git repository on our local machine with a single file that contains the following. Create a branch and ✍ edit # Let’s checkout a new branch called Waylon and change the word to in our file, then diff it. At this point we have one commit. Things are really straightforward, and our diff will be the same between the last commit and the main branch since. Let’s make another commit by adding the date. 👆 At this point, our diff doesn’t tell us the whole story between our current state and main, only between our current state and our last commit. Let’s commit our changes and compare our branch to main. Git is powerful # I…
2 min read

git push without setting upstream

Finally after years of hand typing out a full I found there is a setting to automatcally push to the current branch. More realisitically I just did a let git yell at me, and copying the suggestion. git config # This one setting will now to the current branch without yelling at you that your upstream does not match your current branch. This helps me ship chnages faster as I am constantly chnaging projects and branches.
1 min read

Realistic Git Workflow

My git workflow based on real life. Its not always clean and simple. sometimes things get messy The Clean Path # pull 👉 branch 👉 format 👉 work👉 add 👉 commit 👉 pull 👉 rebase 👉 push Pull # As complicated as that seems it is pretty straight forward. When you sit down to work the first thing you do is to pull down the teams latest working “develop” branch from git. Branch # Next create a new branch with a name that will remind you of what you are working on. For your own sanity choose something descriptive. It is easy to get too many similar branches going and forget which branch is which. Format # If you know which files in existance that you will be editing before you start work it is a good idea to format them in a commit early on to keep your working commits separate from formatting. This will make it easier for reviewers to distinguish from your changes and formatting fixes. If your team agrees to a consistent formatting logic, sticks to it and always remembers to run the linting/fixi…
7 min read
Rewrite History with Git

Rewrite History with Git

rebase git commit –amend Unstage # rage unstage to wipte out history of staged commit Undo file # rage quit git reset HEAD~n removes modifications keeps hitsory of changes and undoes them git checkout HEAD~n – keeps modifications removes history –SOFT –HARD –Mixed undo n commits back # locally before push after push update.gitignore # after push
1 min read

Update Git User

This morning I log into my VCS and check activity on my projects to find that someone else has been very active on my projects fo the last few weeks. I quicklyhover over the missing avatar to find that It’s Me. What’s wrong here, why do I look like two different people throughout the day! upon further investigation I see the issue. while setting up a new terminal environment I mistyped my email address by one character. After much searching and a few failed attempts I was able to fix it by following an article no longer available (2021) from https://help.github.com/articles. Bare Clone # Clone the repo, note it must be a clone. git -author-rewrite # Curl down the script and edit the following variables Run the script, and push the updates. Cleanup # Delete the repo from your local machine. I hope this helps someone, or future me who needs to fix their information in git.
1 min read

remove git cruft

inspiration # My original inspiration for this post came from steven ostermiller’s blog post that no longer exists from my last check in May, 2024. https://blog.ostermiller.org/removing-and-purging-files-from-git-history/ I was able to find it on the way back machine though. https://web.archive.org/web/20240222195617/https://blog.ostermiller.org/removing-and-purging-files-from-git-history/
1 min read