Git 102

Cloning git repository

To stop tracking the files

use rm -rf.git command

To clone git repository

we use git clone _ and paste the repository URL instead of the underscore and the terminal starts cloning the project.

This also creates a TensorFlow folder for us

We use ls command to list all the files inside the tensorflow folder.


File status life cycle

stage 1: Untracked

By using git init command we initialized our git repository but at this stage, our files aren't being tracked. So we are in the untracked stage.

stage 2:Unmodified

To go to this stage we need to add files.

Now we are in the second stage.

Files are being tracked now. They are unmodified.

Stage 3: Modified

To go to this stage we need to make changes in the files inside our folder.

I open the text file which was inside my folder and typed "changed" in it and save it.

Again checking git status.

This shows the contents within the text file have been modified.

Stage 4: Staged

The modified file will be added for tracking and it will be staged using git add text.txt (basically your file name)

Now our modified file has been staged.

Did you find this article valuable?

Support Reuben's blog by becoming a sponsor. Any amount is appreciated!