DevOps Classroomnotes 13/Jul/2023

Rebase

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

  • Rebase in other scenario

Cherry-pick

  • Cherry-picking is where you require one or sequence of commits from one branch to another
  • Consider the following graph
  • In the master branch we need changes from commit id 9c3cc1b
  • Now the history looks as shown below
  • 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 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
Customized Social Media Icons from Acurax Digital Marketing Agency
Exit mobile version
%%footer%%