DevOps Classroomnotes 13/Jul/2023

Rebase

  • The current state of repository
    Preview
  • Now we need the change done on master branch in develop branch
  • So checkout to develop branch and execute git rebase master
    Preview
    Preview
  • Rebase in other scenario
    Preview

Cherry-pick

  • Cherry-picking is where you require one or sequence of commits from one branch to another
  • Consider the following graph
    Preview
  • In the master branch we need changes from commit id 9c3cc1b
    Preview
  • Now the history looks as shown below
    Preview
  • Articles:

Find out what these expressions mean in git

  • diff examples Refer Here
  • git diff ..
  • git diff ^..
  • HEAD~5
  • HEAD~1

Rewriting History

  • We have used interactive rebasing to
    • change commit messages
    • combine commits
    • remove commit
    • edit commits
  • Refer Here for re writing history

Exercises

  • Find a way using cli to show
    • all the commits done on a file
    • show the files in a specific commit
    • find all the commits between some dates

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

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

Please turn AdBlock off
Animated Social Media Icons by Acurax Wordpress Development 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