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. Preview
  • Post Cherrypick Preview

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 Preview
  • After rebase Preview Preview

Some Useful Commands

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

Preview

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

Preview

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

Preview

  • 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>

Preview

Leave a Reply

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

Please turn AdBlock off
Social Media Icons Powered by Acurax Web Design Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube