Skip to main content

Command Palette

Search for a command to run...

Changing a commit message with Git

💡You can change a commit message only for emergencies, so I recommend you be careful because you can break the pull request's reference.

Updated
1 min read
Changing a commit message with Git
C

Hi, I'm Cristina Ramirez, I'm a computer engineer and software developer with more than 10 years of experience as backend developer, web application development, API REST services for mobile applications, system analysis and logic.

Programming languages: Ruby, PHP, C, C++, C#, CSS, JavaScript.

Frameworks: Ruby on Rails, PHP (Codeigniter, APPHP).

Experience of relational databases (Postgres, MySql, Oracle) and NoSQL databases (MongoDB, Neo4j).

I like innovation and teamwork.

🇻🇪 Spanish

1.- If you wrote a commit message incorrectly and pushed it, you can change this message immediately using git commit --amend command, this command open a text editor to change the message. For exit press ESC + Shift + : and write :wq to save changes.

git commit --amend

2.- Force push with command:

git push origin main -f

3.- Use git log command to see historical changes.

git log

Reference:

https://git-scm.com/book/es/v2

44 views