GIT Tutorial for Beginners #5 | Create your First Git Project | Use Git Basic Commands | git init

Pubblicato il: 01 gennaio 1970
sul canale di: Stack Developers
477
21

This Git Project video that runs Git basic commands is a part of my GIT Tutorial for Beginners Series:    • Git Tutorial for Beginners | Create your F...  

In Part-5 of Git Tutorial, we will start using Git for our first sample Git Project. We will try to understand the basic commands of Git with this project. In upcoming videos, we will use Git for our live Laravel projects.

Create one folder testgit in which we will create below files:-
about.html
contact.html
index.html

We will write some dummy content in the above files.

If you are on Windows OS, then go inside testgit folder and right-click to choose "Git Bash Here".

After the Git Bash terminal open, try the below commands:-

git status

The "git status" command is used to understand what stage the files in a repository are at.

The output of this command not only tells you the stage of the files in your repository but also gives you some handy tips on what to do next.

Like if we will run this command now without initializing our project, It will give us a message that is “fatal: not a git repository (or any of the parent directories): .git”.
It is a message that says these files are not considered as a git repository. So we need to initialize our project first.

git init

"git init" initialize our project folder as a Git Repository. This command creates a Git repository skeleton(.git) which contains all necessary repository files in the current working directory.

Like we are going to run the "git init" command for our project folder testgit to initialize it as a Git Repository.

Now if we run the "git status" command again then we will get the files that are present in the folder. Also, it says these files are not tracked.

git add

The "git add" command is used to add files to the Staging Area of the Git.

Like to add all the files for our project folder testgit inside Git Repository we will type “git add --a”, which will add all these files to the staging area.

We can also add some particular files to Git Repository by specifying the name of the file with the "git add" command.

git commit

The "git commit" command is used to save your changes to the local repository. It captures a snapshot of the project's currently staged changes. We can also run this command with the -m option to record a short message that explains what we did and why.

Like we can run the "git commit -m 'Initial Commit" command to finalize our changes to the project.

►Click here to access the complete course:    • Git Tutorial for Beginners | Create your F...  

►Click here to subscribe - https://www.youtube.com/stackdevelope...

Other Popular Stack Developers Series that can help you:-

►Laravel Advance E-commerce Series -    • Laravel Tutorial for Beginners | Advance E...  

►Laravel API Tutorial -    • Laravel API Tutorial | Create API from Scr...  

►Laravel Interview Questions -    • Laravel Interview Questions & Answers | 20...  

►jQuery Tutorial -    • jQuery Tutorial  

►Laravel Basic E-commerce Series -    • Make Admin Panel / E-commerce Website in L...  

►Laravel Dating Series -    • Make Dating / Social Networking Website in...  

Follow Stack Developers on Social Media to get updates and resolve your queries
►Like Facebook Page to get updates -   / stackdevelopers2  
►Join Facebook Group to resolve your queries -   / stackdevelopers  
►Follow on Instagram -   / stackdevelopers2  
►Follow on GitHub - https://github.com/stackdevelopers

#Git #GitTutorial #GitBasics


In questa pagina del sito puoi guardare il video online GIT Tutorial for Beginners #5 | Create your First Git Project | Use Git Basic Commands | git init della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Stack Developers 01 gennaio 1970, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 477 volte e gli è piaciuto 21 spettatori. Buona visione!