Git rebase

 

The rebase command is used to bring changes from another branch, usually a branch from which the current branch migrated from. It is basically putting the changes on the base and not on top.



git rebase commit-id(from the parent branch)

You can always rebase from master which is the source of truth.

# 1 - pull latest code from master
git checkout out master
git pull --rebase

# 2 - checkout out feature branch
git checkout create-swipe

# 3 - rebase feature branch from master
git rebase master

If you want to revert rebase in progress you run this command:

git rebase --abort

 




Subscribe To Our Newsletter
You will receive our latest post and tutorial.
Thank you for subscribing!

required
required


Leave a Reply

Your email address will not be published. Required fields are marked *