GIT - 4.8 Express Commits
We will edit an existing file managed by Git. In my terminal I am currently in our restitory. If I do a Git Status, we currently have a clean work repertoire, there is nothing in Commit. With an LS we have a cuckoo and Venus file, let's update our cuckoo file with the file code control of the file. Here we will add a little text, we save then we leave, back to the terminal, I will make a git status and now git tell me that I have a file modify the difference is therefore in the previous videos our file and hello .html was not followed and that it was then the changes validated in this case we displayed modified which simply says not prepared modifications for the commit. This is how Git follows the differences between the files not followed and the files followed to find out which file Git follows we can there is the Git LS -Files command. Git tells me that 2 files are under follow -up, the Venus file and the cuckoo file. If I add a file using the Touch command and for example the name of the file which will be earth.html we make a small LS, I can see that the new earth file is in my file system. Git sees that I have a non -followed file and the modification of the cuckoo.html file. Make a git ls -files it always reveals that Git only follows Venus and the cuckoo file but not the new earth file. Let's get rid of this file with the RM Terre.html command is the bash command to delete, make a status git. Now I am back to simply have changes to the cuckoo file and the reason why I review this is to show which files are followed and that the following command is based on all files followed to work and it is This moment that we use the Git Commit -A command; Parameter A indicates to Git to add the modified files first to the Git intermediary area, then go directly to the Commit. We can do this with a single order in this option, now you may wonder why add a modified file? This is simply the way Git works, that's why I add the changes to the Git preparation area and then apply them. Let us continue by also specifying our share to M that we can combine in a single parameter so an AM so git commit am and in quotes the name of our message for me will be update, the commit is finished, so if I hide git log, j Now have 2 commits, the most recent is at the top.