Dive in Git & GitHub ????

Dive in Git & GitHub ????

Why is GIT important? What is it?

  • Git is a distributed version management system that is free and open-source or the system that makes tracking possible is GIT.
  • Tracking "What," "When," and "By Whom" is simpler.
  • Git has been used to make changes.
  • It allows us to merge the two branches together after making changes and testing code on one branch without changing our main code base.
  • enabling us to roll back to prior iterations of our code in the event that we discover a mistake.

Can you explain the difference between Git and GitHub?

No alt text provided for this image

What distinguishes the master branch from the main branch?

  • Since both are the default branches when you establish a repository, there is technically no real distinction.
  • Currently, the default branch on Github is main, whereas some other services use master as the default.

What distinguishes a local repository from one that is located elsewhere? How can I link my local and remote computers?

  • We will make local modifications in the Git local repository, which is normally found on our computer.
  • The server-based Git remote repository is located at a typical distance of 262 miles (but could be further).
  • The remote connections, such as those between a local Git repository and a remote GitHub repository, are made using the git remote command.

How do you create a new repository on GitHub?

  • Go to github.com and log in to your account.
  • In the upper-right corner, Click the " + " and select new repository.?
  • Enter a name for your repository.
  • Click the “Create repository” button.

No alt text provided for this image
No alt text provided for this image

Tasks

Set your username and email address, which will be associated with your commits.

No alt text provided for this image

Create a repository named "Devops" on GitHub

No alt text provided for this image

Connect your local repository to the repository on GitHub

The?git init?command transforms the current directory into a Git repository.

No alt text provided for this image

use git remote?command to connect local repository to the GitHub repository.

git remote add origin <URL_from_GitHub_repository>

No alt text provided for this image

Create a new file in Devops/Day-02.txt & add some content to it.

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

Push your local commits to the repository on GitHub

Git push?: The git push command is?used to upload local repository content to a remote repository.

git push origin master.


Thank you for reading ???

Basudeb Acharyya

Senior Consultant at TCG Digital

9 个月

Very impressive

Girish Revankar

Software Engineer at UNVIRED SOFTWARE INDIA PRIVATE LIMITED

1 年

Very neatly explained information about Git and GitHub

要查看或添加评论,请登录

社区洞察

其他会员也浏览了