Finally, the only thing left to see is how to register the successive changes in our development.
9. Registering changes
We are going to make some changes to the source code file. First we will add the typical line of environments * nix for the scripts and then we will make a slightly more enthusiastic message. In this case we do it with the text editor.
If we run the command git state This will inform us that there were changes and that we must make a new c to register them. So we execute:
~ / HelloWorld $ git commit -a -m "Adding more enthusiastic message"
When we started our project in Google Code, we established that it would have the license GPL v3, it states that the software must be distributed with a copy of the license file. That is why we can connect to the site of GNU and download it.
Now that we have the license file we can add it to our project. Simply by dropping it in the working directory. If we run a git state, it will inform us that there were changes but that the file in question is not being «tracked»(If I may use the term).
In order for the change to be reflected in our repository, we must effectively add it using the command git add.
~ / HelloWorld $ git add LICENSE.txt
If we run again git state this will inform us that a new file has been added. Finally we run a c to establish a new version and finally we can upload the current state of our local repository to the remote repository hosted in Google Code.
~ / HelloWorld $ git commit -a -m "Adding GPL v3 License file" ~ / HelloWorld $ git push gc master
10. Reviewing our history
If we connect to the repository of our project in Google Code we can see in the section Source in section Changes the different versions that we have been using in our development.
You can see the repository at the address: http://code.google.com/p/lecovi-hello-world/source/browse/
As you will see, it is quite simple and it is an extremely useful tool. I hope you liked it, it has served you and I await your comments.