Table of contents
- GIT:
- Difference between Main Branch and Master Branch.
- Difference between GIT and GITHUB:
- New Repository Creation over GITHUB.
- LOCAL REPO VS REMOTE REPO:
- TASK:
- Create a repository named "Devops" on GitHub
- Connect your local repository to the repository on GitHub.
- Create a new file in Devops/Git/Day-02.txt & add some content to it
- Push your local commits to the repository on GitHub
- OUTPUT:
GIT:
GIT is a source code management system which is used to maintain different versions of the code,which makes developers life easy and handle projects with speed and more efficiency.
Difference between Main Branch and Master Branch.
There is no such specific difference between Main and Master, if we create or initialize repo in Local, Master Branch will act as default.
for Remote Repo,Main will act as default branch.
Difference between GIT and GITHUB:
GIT | GITHUB |
GIT is a software | GITHUB is a service |
Command line tool | Graphical user interface |
It focuses Code sharing and version control | It focuses on centralized source code hosting |
GIT is a version control system used to manage source code history. | GITHUB is a hosting service for repositories |
New Repository Creation over GITHUB.
LOGIN GITHUB--->Profile--->Your repositories--->click on NEW
Provide REPO Name and select options as below---->create new Repository.
LOCAL REPO VS REMOTE REPO:
LOCAL | REMOTE |
It is stored on your local machine | It is stored on Remote computer |
When you are finished with doing changes into your workspace, you can add them to staging area and from there you can commit the changes to your local repository. This can be done even when you are disconnected from the internet and nobody else can see the changes in your local repository. | The remote repository is usually used by teams as a central repository into which everyone pushes the changes from his local repository and from which everyone pulls changes to his local repository. |
Nobody can make changes | Anybody can make changes |
Remote repo can be pulled to your local machine to make changes by using git pull command | Changes can be moved to remote repo by git push command |
Master is a default branch | Main is a default branch |
TASK:
Create a repository named "Devops" on GitHub
Connect your local repository to the repository on GitHub.
Create a new file in Devops/Git/Day-02.txt & add some content to it
Push your local commits to the repository on GitHub
Solution:
Steps:
Created DevOps REPO in GITHUB
Clone REPO in Local machine -git clone url
Created day2.txt and made some changes
git add filename
git commit -m "comment"
git config --global user.name "name"
git config --global user.email "email"
git remote add url
git push -u origin main
OUTPUT:
Thank you for reading!! Hope you find this helpful.
#day09challenge#90daysofdevops
Always open for suggestions..!!
Thankyou Shubham Londhe !!