Reputation: 4725
If I am working on a feature branch, and I want to fetch and rebase in changes from the master branch, is there a shorter way to do it than this?
git stash
git checkout master
git pull
git checkout my-feature-branch
git rebase master
git stash pop
Note how I have to stash too, because I have edited a config file that I don't want to commit.
How can I do this in fewer commands?
Upvotes: 1
Views: 285
Reputation: 761
If you have zsh you can use oh-my-zsh, which provides an alias for git rebase master that's just grbm
Upvotes: 0
Reputation: 601
Perhaps you can write a script for this.
I think against git rebase master is better git merge master --no-ff
If you use gitflow, there are some maven plugin to make a feature branch or finish feature branch etc. But the feature branch is from develop branch not from master.
Upvotes: 0