Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Edit most recent Commit Message

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 521
    Comment on it

    Hi,

    Committing is a way in GIT, that adds changes to the repository history and assigns a understandable commit name to it. If by mistake one added a wrong commit message and want to edit it, he can use the below command:

    git commit --amend

    This command will open your editor and allow you to edit your most recent commit message.

    You can also change your commit message directly without opening the editor using the below command:

     

    git commit --amend -m "Enter new commit message"

    If you have already pushed the branch then you are editing the commit message that you have to push the branch forcefully. To push the branch forcefully one can use below command:

    git push --force origin <BRANCH-NAME>

     

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: