DevOps Classroom Series – 07/July/2021

Making changes in commits

  • Changing the commit message of the immediate commit which head is looking at Preview Preview

  • Change the commit messages way back in history Preview

    • Now lets use the pattern #0001 from #1 i.e single digit to four digits
    git rebase -i --root
    git rebase -i HEAD~2
    
  • Delete the commit in the history. Lets delete the second commit

git rebase -i HEAD~4

drop commit 2
  • Combining two commits into one commit
    • Here we use squash option
git rebase -i HEAD~2

pick  third commit
squash fourth commit
pick fifth commit

Working with Remote Repository

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 Responsive Web Designing 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