purplecat (
purplecat) wrote in
dw_dev_training2013-10-30 09:31 pm
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
![[site community profile]](https://www.dreamwidth.org/img/comm_staff.png)
Entry tags:
Git Logs and Merging develop into a branch
I'm about to push my latest bug fix to github. While I've been working on this bug there's been some changes to the main develop branch so, obviously, I want to merge these into my branch before I push my code and submit a pull request.
Now I recall that in the past I've been asked to clean up the log after doing this but I've forgotten the process for achieving that. If someone could post an idiots' guide in the comments that would be really useful!
Now I recall that in the past I've been asked to clean up the log after doing this but I've forgotten the process for achieving that. If someone could post an idiots' guide in the comments that would be really useful!
no subject
What I'd do:
# take all your existing commits, throw them on top of develop
git rebase develop
If you get an error messages, let me know (but that should be fine, I don't think there's been much activity in that specific part of the code!)
Assuming that went okay, though, now we rebase again, this time manipulating the commits:
git rebase -i develop...
That means "do an interactive rebase for commits on this branch, starting from where it diverges from develop onwards".
There are instructions when you run the command; you'll likely be using the "squash", "reword" or "fixup" commands.
(I believe it might be possible to just do that in one step, but I prefer splitting into two for manageability if there's conflicts)
no subject
no subject
Crossing fingers and I wish you luck!
no subject
Last three commits gone missing...
no subject
no subject
Sorry, but I'm glad you recovered!