DEV Community

Jesse Phillips
Jesse Phillips

Posted on • Edited on

1

My old git processes

I've transitioned to using rebase interactive but I think what I use to do may help others become more comfortable with moving changes around. The goal of these are to organize commits because they are on a branch with other changes or I want to combine commits.

First off, I make sure I have gitk open. This tool is nice because using F5 to refresh maintains the previous known tree state.

Create a new branch at the commit you want to place your commits. Now cherry pick (right click the commit in gitk) the desired change.

If you want to combine commit with the last one then use

git reset --soft HEAD~2
git commit -m...
Enter fullscreen mode Exit fullscreen mode

I am able to cherry pick my commits in any order and I can make the commit history smaller by combining related commits.

Now that you have gone through this, read through git rebase interactive.

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →