简体   繁体   中英

How do I update a command in git?

I am totally new to git and heroku. I am trying to deploy an app to heroku but there was a problem and I later realized that I ommitted ':' from my if statement in my python script. I have made the necessary correction, but the deployment is still not successful. I have already run this command git add app.py in my powershell, but I think I am supposed to make an update of this command. Is there a way to make the update or do I run the git add app.py command again?

I am using Microsoft Windows Powershell on Windows 10, and using git version 2.28.0. Thanks for your help.

I think you forgot to commit after adding to staging area

run the following command:

$ git add <filename>
$ git commit -m "your message if any"
$ git push heroku master

As you didn't commit your change your changes have not saved to your local repository. So just commit your changes. just follow:

git add app.py
git commit -m "your message"
git push heroku master

follow the link to know more about git commit : https://www.git-tower.com/learn/git/commands/git-commit#:~:text=The%20%22commit%22%20command%20is%20used,changes%20to%20the%20local%20repository.&text=Using%20the%20%22git%20commit%22%20command,%22git%20push%22%20commands ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM