DEV Community

Discussion on: Git helpers - Simplify your git workflow

Collapse
 
gyandeeps profile image
Gyandeep Singh

I have never heard of that... an you explain that a little bit as to when do you use and how it works...

Collapse
 
lt0mm profile image
Tom • Edited

yeah I found it somewhere as it usual happens, I use it for 2 aliases


rebase-branch => !git rebase -i `git merge-base master HEAD`
reset-branch => !git reset `git merge-base master HEAD`

first do interactive rebase of feature branch from first commit after master, second just reset all commits on feature branch leaves you with unstaged changes of all commits (you're loosing all commit messages of cause), so I thought that in your case maybe it would be good instead of default 2 commits back interactive rebase do rebase from the beginning of feature branch