Dark Mode
Image
  • Wednesday, 21 February 2024
DevOps-4: Source Code Management (SCM) [Github]

DevOps-4: Source Code Management (SCM) [Github]


DevOps-4: Source Code Management (SCM) [Github] - Outline

4.1. Introduction to Github

GitHub, Inc. is a provider of Internet hosting for software development and version control using Git. It offers the distributed version control and source code management (SCM) functionality of Git, plus its own features. It provides access control and several collaboration features such as bug tracking, feature requests, task management, continuous integration, and wikis for every project.

Github is a web-based version control and collaboration platform for software developers. It helps to,

Introduction to Github

  • Helps to collaborate
  • Publishes project
  • Supports transparency

Purpose of using Github,

  • Allows developers to share their code and view other’s code.
  • Helps to follow each other and rate each other’s work
  • Allow user to receive updates about the different project.

 

4.2. Different between Git and Github
Git Github
Git is Version Control System that Mange and track source code. Github is a cloud-based hosting service that manage git repositories.
It is a software that installed and maintained on the local system. It is a service that hosted on the web
It is a command-line tool. It is a graphical interface
It is a tool to mange different versions of a file in a git repository It provides a web-based git repository to upload files.

 

4.3. Github Basic

Github Official website url is below,

https://github.com/ Github Github

 

4.4. Creating a Repository in Github

To create Github repository, it has two protocol-

  1. HTTPS
  2. SSH

 

4.4.1. Create a Repository in Github using HTTPS protocol

Github Github

Now time to go to github and create a repository.

Github

Create a new repository on the command line:-

          
echo "# sdfsdafds" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/JohnSamuels/HttpsRemoteReps.git
git push -u origin main

push an existing repository from the command line:-

git remote add origin https://github.com/JohnSamuels/HttpsRemoteReps.git 
git branch -M main
git push -u origin main

Github

 

Github

 

4.4.2. Create a Repository in Github using SSH protocol

Github

 

Github Github

 

Github Github Github Github Github

 

4.5. Pulling Commits from Github

Github Github

 

4.6. Collaborating between Local and Remote Repository

Github

 

Github Github Github Github Github

 

Github

 

4.7. Managing Multiple Commits in Git

To following settings needs to be configured for all commits:

Github

 

Github

 

Github

 

Github Github Github Github

 

4.8. Merging File Changes in Git

Github

 

Github

 

Github Github Github

Open the conflict file and resolve it manually.

Github Github Github

 

Github

 

4.9. Issue Tracking in Github

Github

 

Github

 

Github

 

Github

 

Github

 

Github

 

Github

 

Github

 

4.10. Assignment

Push the contents of the local repository into the remote repository. Update a file in the remote repository and then pull the changes into the local repository. Subsequently modify the file locally and push the change to the remote repository.

 

 

Comment / Reply From