Press "Enter" to skip to content

Switching a Git Commit to another Branch

Olivier Van Steenlandt fixes an oopsie-doodle:

In the past couple of months, I’ve been doing a lot of different things at the same time. Because of that, it is no exception that I have quite some branches for my Database Projects that I’m working on simultaneously.

Because of this, another issue arises as well, it happens now and then that I’m committing my changes to the wrong branch. Luckily for me, I’m making this mistake by committing directly to my development branch, where the change needs to be done in the end anyway.

Nevertheless, I need to get my change into my feature branch as well. In this data recipe, I will be guiding you through the process.

Click through to see how. If you’re using a GUI like GitHub Desktop or Sourcetree, there are also ways of doing this within the UI.