DevOps Classroom notes 31/Aug/2025

Git interactive rebasing

  • HEAD~n => represents going back n commits.
  • Actions that can be performed
    • pick -> use the commit as it is
    • reword -> change the commit message
    • edit -> pause and lets you ammend the commit
    • squash -> combine the commit into previous
    • drop -> remove the commit entirely
  • To perform interactive rebasing the command is
git rebase -i HEAD~n
  • This opens an editor
    Preview
  • Merge conflicts in rebasing have to fixed added to the staging area and then git rebase --continue
  • Rebase can be aborted using git rebase --abort in the cases of conflicts or edits
  • Refer Here for interactive rebasing.
  • Note: Be extremely careful while doing interactive rebase of public branches.

Exercise:

  • Create a repo
  • Create 5 commits on main branch
  • now create a rel_v1.0 and create two commits
  • now merge the changes from rel_v1.0 to main
  • I want to revert the merge.
  • Refer Here for reflog

Git Remote Repositories

  • A Remote Repository is another git repository located any where
  • Popular Remote Repositories:
    • Cloud Hosted Solutions:
      • GitHub: Create Account
      • Gitlab
      • BitBucket
      • Azure Source Repos
      • AWS Code Commit
    • Self Hosted Repostiories:
      • Gitlab
      • Gitolite
  • To be continued….

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
Plugin for Social Media by Acurax Wordpress Design Studio

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