DevOps Classroom Series – 07/July/2021

Making changes in commits

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

  • Change the commit messages way back in history

    • 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 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
Plugin for Social Media by Acurax Wordpress Design Studio
Exit mobile version
%%footer%%