Git & GitHub -2

Git & GitHub -2

Git: Git?is a free and open-source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. git is also used for?source code management.

Difference Between the Main Branch and Master Branch?

There is no difference between the main and master branch in git. The Main or Master branch is a default branch when you create a repository. GitHub now uses main as its default branch. while others still use the master branch as a default branch.

Git:

Git is a distributed version control system, tracks changes in any set of files, usually used for coordinating work among programmers collaboratively developing source code during software development. Git is installed and maintained on your local system. Git is a command-line tool.

GitHub:

GitHub is a cloud-based platform that provides hosting for version control using Git. It is a service we use to store our project files. GitHub is designed as a git repository hosting service. GitHub is a graphical user interface.

Create a new repository on GitHub.

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


Difference between local & remote repositories it the local repository is?the one on which we will make local changes, typically this local repository is on our computer.

Git remote repositories are hosted on a server that is accessible to all team members.?

A git remote command is used to make remote connections such as connecting a Git local repository with GitHub remote repository.

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

No alt text provided for this image

Connect your local repository to the repository on GitHub.

Use the git remote command to connect the local repository to the GitHub repository.

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

No alt text provided for this image

git remote add origin <URL_from_GitHub_repository>

Create a new file in project/Devops/Day-01.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

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

Thank you for reading article!



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

Ibrahim S的更多文章

  • Git - Interview question

    Git - Interview question

    What is Git, and how does it differ from other version control systems? Answer: Git is an opensource version control…

    1 条评论
  • AWS - EKS

    AWS - EKS

    Amazon Elastic Kubernetes Service (Amazon EKS) is a fully managed Kubernetes service. Kubernetes is open source…

    1 条评论
  • Docker Volume

    Docker Volume

    ??Docker volumes are used for data persistence in Docker. So if we have a database or state full application, we would…

  • Content Creators Need To Avoid on Linkedin Mistakes

    Content Creators Need To Avoid on Linkedin Mistakes

    ?????????????????????? ???????? ????????????????: Your headline is the first thing people see. Craft a compelling and…

  • Kubeflow || SageMaker

    Kubeflow || SageMaker

    Kubeflow and Amazon SageMaker are both popular platforms used in the field of machine learning but they differ in terms…

  • Power of Digital Marketing

    Power of Digital Marketing

    In today's fast-paced digital landscape, businesses must adapt and embrace the power of digital marketing to thrive and…

    1 条评论
  • What is Virus ...?

    What is Virus ...?

    A computer virus is a program or piece of code designed to damage your computer by corrupting system files, wasting…

    1 条评论
  • What Is Infrastructure as Code (IaC)?

    What Is Infrastructure as Code (IaC)?

    Infrastructure-as-Code (IaC) tools automate the management of IT infrastructure using programming languages and…

  • Remote Code Execution Attack (RCE)

    Remote Code Execution Attack (RCE)

    What is an RCE (Remote code execution) attack? It is a bug in a service receiving data from a network port that allows…

  • Active Directory - Azure

    Active Directory - Azure

    Azure Active Directory (Azure AD) is a cloud-based identity and access management service. Azure AD enables employees…

社区洞察

其他会员也浏览了