How to add forgotten files with git commit --amend

Published: 01 December 2021
on channel: One Minute Git
138
1

I often find myself in a situation where I have committed to early and forgot to add necessary files (it's like sending an e-mail without attachment).
In this case if I have not already pushed that commit, I can edit it locally with git commit --amend.

I can't stress that engouh: Only ever do this with local commits which have not already been pushed to a remote repository!

Have fun using git!

More info on https://git-scm.com/book/en/v2/Git-To...


On this page of the site you can watch the video online How to add forgotten files with git commit --amend with a duration of hours minute second in good quality, which was uploaded by the user One Minute Git 01 December 2021, share the link with friends and acquaintances, this video has already been watched 138 times on youtube and it was liked by 1 viewers. Enjoy your viewing!