Skip to main content

How can I modify the last commit on my local repository and on the reomte one too for the pull request

 How can I modify the last commit on my local repository and on the reomte one too for the pull request


To modify the last commit in your local repository and update the pull request on the remote repository, follow these steps:

1. Modify the Last Commit Locally

Make the necessary changes to your code and stage the changes:

git add <modified-files>

Now, instead of creating a new commit, amend the last commit:

git commit --amend

This will open your default editor, allowing you to change the commit message if necessary. If you don't want to change the message, just close the editor. This will include the new changes in the last commit.

2. Push the Updated Commit to the Remote Repository

Since you've amended the commit, its hash has changed, so you need to force-push the updated commit to the remote repository:

git push --force


Comments

Popular posts from this blog

Highlights on my contributions to Odoo Community Association

 Highlights on my contributions to Odoo Community Association For me as a developer working on odoo community and providing services to the customers using the community version of Odoo. Sometimes the solution is available in a module published by OCA that could be an older version of Odoo. As a result, I decided to put my upgraded modules on their repositories as a contributor, and I asked to join them on the mailing list. For them, before I start to make a pull request, I need to sign their ICLA document. ICLA means Odoo Community Association Individual Contributor License Agreement. To upgrade a module to version 17.0 I had to follow the instructions stated on: https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-17.0 Firstly this section: https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-17.0#before-migrating Which needs you to: (1)      Subscribe to OCA mailing list (2)     Sign ICLA as stated above (3)     I...

How to dynamically load a JS file in JavaScript

How to dynamically load a JS file in JavaScript   https://www.educative.io/answers/how-to-dynamically-load-a-js-file-in-javascript function  loadJS ( FILE_URL ,   async   =   true )   {    let  scriptEle  =  document . createElement ( "script" );   scriptEle . setAttribute ( "src" ,   FILE_URL );   scriptEle . setAttribute ( "type" ,   "text/javascript" );   scriptEle . setAttribute ( "async" ,   async );   document . body . appendChild ( scriptEle );    // success event    scriptEle . addEventListener ( "load" ,   ()   =>   {     console . log ( "File loaded" )    });     // error event   scriptEle . addEventListener ( "error" ,   ( ev )   =>   {     console . log ( "Error on loading file" ,  ev ); ...

Create mail alias in odoo

 Create a mail alias in odoo  to solve that error: Explainn in log "create an appopriate mail.alias or force the destination model" Settings  >  Email  >  Aliases  >  add alias email to your domain name Settings >Technical > System Parameters > key: mail.bounce.alias, value: bounce Settings >Technical > System Parameters > key: mail.catchall.alias, value: catchall Settings >Technical > System Parameters > key: mail.catchall.domain, value: example.com