Web Content Display
In addition to the basic Linux Shell commands, Git client also provides us with the following commands:
$ git clone <Link>
This command is used to clone a repository to a local directory. First of all, we need to move to the directory where we want to copy the repository. Once there, we should execute the command following the specified structure where <Link> is our repository's link.
$ git pull
This command updates our current local repository to the latest version on the cloud.
$ git status
Shows the status of every change made locally. If there are changes that are not committed, will appear in red color. Otherwise, everything will be in green and it will tell us that is ready to commit or that there are no changes to add.
$ git push
This command updates our cloud repository to the version that we are working on locally. In other words, replaces the code that we have uploaded on the cloud by the one we have on our device.
$ git commit -m "message"
Before you push your changes to the cloud, you need to explain what you have done. Using commit get all the changes ready to be pushed. By using -m you can add any message that you want (replacing word message from above) to the current commit.
$ git add <file.ext>
By using git add we stage all changes related to file.ext and get them ready to be committed. If we would like to stage the whole project we should use the command [$ git add .]
$ git remote
Remote has actually a lot of possibilities. It can be used to check and move between branches, to add or delete content or many other advanced settings. In this case, it is used to manage the set of repositories whose branches you track. If you want to know all possible commands you can check Git website right here.
An example of the basic sequence to upload a project to the cloud would be first using [$ git add .], followed by [$ git commit -m "new update"] and finally uploading it by using [$ git push].
If you want to know more about Git client commands you can check Atlassian website here.