I'm Brian.
Let's talk about...
It's scary.
hard to read history:
worthless messages
why?
(commit messages)
— Serj Shine
— Lu Zou
— Shehan Perera
— Shaun Shapiro
— Maria Zhao
— Ankit Gupta
— everyone
Count number of items we are working with in `git log`, use this for the following command
git rebase -i HEAD~4
[esq] :wq
[esq] :wq
I just really want to include this image.
now two comments about the same thing separated by other commits
git log`git rebase -i HEAD~4`
[esq] :wq
[esq] :wq
git rebase -i HEAD~2
choose item(s) to be squashed
[esq] :wq
instead:
what does this do?
git log
git pull --rebase origin development
remove commits that are not in development, pull changes from development, reapply our commits at the end.
Looks like there were at ton of commits we forgot to reorder and squash
`git rebase -i HEAD~20`
select commits to squash
[esq] :wq
fix commit message
[esq] :wq
`git push -f origin bk-save-searches-modal`
You may have noticed that the last commit has the wrong author, that's because I squashed my commits into one of Maria's. Now she gets all the credit for my hard work.
git commit --amend --author "Brian Kulyk <brian.kulyk@move.com>"
When submitting my PR, I was warned about a merge conflict that needed to be dealt with manually. We can use rebase to fix this too.
git pull --rebase origin development
conflict
`git status` to see conflicted files
resolve the conflict manually
`git add .` git rebase --continue`
Notice there is no extra merge commit, which is good... 'cause those are gross.
use `git pull --rebase`