Chase AdamsChase Adams
AboutContentPromptsPlayground

git

Essays and updates on product, engineering, and AI by Chase Adams.

1 minute read

I use git for version control.

Tips

Rename a branch...

To rename a branch, while on the current branch, run the following in the terminal (replacing newBranchName with the branch name you want the current branch to be called):

git branch -m newBranchName

Undo a commit and add more to it

Sometimes I find myself committing a small chunk of code that isn't quite right. I'll either refactor it or fix it, but I don't want to create a new "fix" commit.

When the commit was the most recent commit I made and I haven't pushed yet, I'll do a soft reset:

git reset --soft HEAD^

A soft reset removes the most recent commit and the files that were in that commit are staged. You can then add your fix and recommit with the same message.

Relevant Notes

  • Why Git May Be Ignoring You When You Downcase Filenames
  • Deploy Code with Git Push and a Post Receive Hook
First Cohort
No Coding Experience Required

Build Your Website with AI—No Code Required

Learn to create and deploy professional websites using ChatGPT and Claude. Go from complete beginner to confident website builder.

Start Building Today

Post Details

Published
Oct 9, 2022
Category
Engineering
Share
Ask ChatGPT
Ask Claude

Latest Posts

Joining Rocket Money as VP of AI Engineering

Joining Rocket Money as VP of AI Engineering

Leading AI engineering at Rocket Money to write the playbook for how engineering teams operate in the AI era

AboutAI Workflow SpecContentStacksNewsletterPromptsRSS

Ask me anything

Loading...

Hi! Ask me anything about Chase's work.

I can answer questions based on his blog posts and articles.

Experimental: This chat is a side project I work on in my free time. Responses may vary in quality and accuracy.