DevOps Classroom Series – 06/Jul/2021

Cherry-pick

  • As shown in the below image we would like to have one commit (in blue) created in branch v2.0 to be added to v1.0 as it is important fix.
  • Post Cherrypick

Rebase

  • As shown in the below image we have made changes in the master branch and we want those changes in the v1.0 and v2.0 branches
  • After rebase

Some Useful Commands

  • View history of last n commits
git log -n
git log -3

  • View the graph
git log --decorate --graph --oneline --all

  • Search commit by message
git log --grep "expression"

  • Viewing the differences b/w any two commits
git diff <commitA>..<commitB>
git diff <branchA>..<branchB>
git diff --name-only <commitA>..<commitB>
git diff --name-only <branchA>..<branchB>

Leave a comment

Turn on JavaScript to leave a comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Social Network Integration by Acurax Social Media Branding Company
Exit mobile version
%%footer%%