GIT - 4.13 Exclusion of unwanted files
We will ignore the files and files that we do not want to follow in our restitory, we need an LS - All like this I am currently in the restitory test I am on the master branch, I have nothing to commit because I have a clean work repertoire. By reading my files I have an Venus.txt and a cuckoo.html file the 2 files I want in my restitory. And I will claim that this rest is part of an application it contains and that it generates logs during its execution. So with my text editor so I will create this file in Touch Application.log as this and I will open it with my text editor including Code Application.Log. I will add a few random lines to represent a log, I save and close the file. If I do an LS, you can see that I have my application .log and generally we do not want to store log files and no other file generated or not being part of the original source being part of this project. If I do a Git status, Git sees that we have this application. Log can always try not to forget to exclude this file. When I do my commits I know that I will probably forget and that I will add and this log will be found in my restitory git, fortunately Git offers a practical means of excluding files and folders that we do not want. In Restitory Git, it's called a Git ignores. So type, code. Git ignores, press Enter. In addition, the syntax of this file is simply an expression by line. Here we will type the name of our file, I could specifically target this file but it is more likely I will target all the log files, so I will use a star expression. Log It means all the files that end with the log point. They will be excluded except that returning to the terminal if I make a Git Status, you can see that the guide ignores and already at work you will notice that the Git point ignores itself is a file which must be followed in restitory. Add the Git Add. Git ignores, it is added in the Git transfer zone including a Git Commit - M with the name a message that will be added the file, a Git Status. I am back in our clean work repertoire from which our Point Log application has been excluded it is always in the file system but not in our Restitory. For the moment I am going to go ahead and simply delete the log file entirely we are going to do an RM application .log, like this, and that's it, it is deleted.