I'm a bit new to the whole rebasing feature within git. Let's say that I made the following commits:
A -> B -> C -> D
Afterwards, I realize that D contains a fix which depends on some new code added in A, and that these commits belong together. How do I squash A & D together and leave B & C alone?
...
Hi all,
I work in a branch 'develop', and when ready to merge with master, use interactive rebase to squash all my little commits into one feature-encompassing commit which I gets applied on top of master.
Works well, only issue I have is the time the commit is labelled is of the first small commit. It makes sense as that is the only c...
Here's a common workflow hurdle I encounter often:
master is our "stable" branch
$ git status
# On branch master
nothing to commit (working directory clean)
create a module on a branch
$ git checkout -b foo
$ echo "hello" > world
$ git add .
$ git commit -m "init commit for foo module"
$ git checkout master
$ git merge foo
do work...
I've just learned about rebase, and I've been strongly warned not to rebase commits after they have been pushed to a remote. I want to make sure I'm not going to explode my repository
Example commit history
foo W---X---Y
/ \
master A---B---C---D---E---Z---F---G
Here, all commits on the maste...