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
  • 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 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 Media Icons Powered by Acurax Web Design Company
Exit mobile version
%%footer%%