понедельник, 6 апреля 2015 г.

Rebase a branch in git

How to rebase a branch in git?
You can rebase the other branch on top of the base branch by running


git rebase baseb_ranch_name feature_branch_name
 

More about rebasing http://git-scm.com/book/ch3-6.html

Reset last commit in git without losing its changes

How to reset the last commit in git without losing its changes?

git reset --soft HEAD^ 

This resets the head to previous commit and leaves all your changed files staged.

Link to documentation http://git-scm.com/docs/git-reset