Git
Git
----
-> Git is version control system that helps to track changes in code.
-> The advantages of git over others are
1.Popular
2.Free and open source
3.fast and scalable
-> Github allows developers to store and manage their code using Git.
Repository:
-----------
-> A Git repository is a central storage location for managing and tracking changes
in files and directories.
-> Repositories are of 2 types
1.public - visible to all
2.private - only visible to collabarators
->We can initialize the repository by adding a README file while creating a
repository.
->This README gives the discription about our project.
Commit:
-------
-> A modify or update a file we need to commit the file.
Basic commands:
---------------
1. clone - cloning a repository on our local machine.
3. git remote -v
4. git branch
Git workflow:
--------------
Github Repository
|
clone
|
changes
|
add
|
commit
|
push
Git branches:
-------------
-> A project may have multiple modules so each module uses a different branch
inorder to maintain code .
-> After completion of the entire project we merge all the branches.
Pull request:
-------------
-> It lets you tell others about changes you have pushed to a branch in repository
on Github.
-> It is one of the way to merge branches.