Category: GIt

  • Host key for github.com has changed and you have requested strict checking.

    Host key for github.com has changed and you have requested strict checking.

    I find this error from time to time, so posting the solution here for easy finding: This is what the error looks like after trying to run git pull: The solution is to run the following command: The ssh-keygen -R command is used to remove a host’s key from the user’s known hosts file. When…

  • Git commands to replace a branch with another branch

    Git commands to replace a branch with another branch

    git branch -m my_feature_branch my_feature_branch_new_name # Rename my_feature_branch git checkout my_feature_branch_new_name && git push origin my_feature_branch_new_name # Push the backup to the origin, so it is there as reference for other team members. git checkout master # Checkout to the branch that will replace the my_feature_branch. git checkout -b my_feature_branch # Create a new my_feature_branch…