Skip to content

Instantly share code, notes, and snippets.

@ozinepank
Last active January 15, 2016 09:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ozinepank/a0f257346beac931129f to your computer and use it in GitHub Desktop.
Save ozinepank/a0f257346beac931129f to your computer and use it in GitHub Desktop.
Git rebase and merge form : master

checkout to your current working feature/branch

git checkout -b feature/branch

checkout new tmp branch from feature/branch

git checkout -b tmp

delete feature/branch for merging commit logs

git branch -D feature/branch

checkout to the base branch

git checkout master

checkout feature/branch from master

git checkout -b feature/branch

merge tmp( this contains your working history ) to feature/branch

git merge tmp --squash

commit amend with new message, this will be on 1 single comment

git commit -m "Fix Message"

force push

git push origin feature/branch -f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment