Session1 :- Git & Github

Session1 :- Git & Github

It was a pleasure Utilising the lockdown time in the best possible & effective manner UNDER THE GUIDANCE OF WORLD RECORD HOLDER - Mr. Vimal Daga sir by learning DevOps.

Use:-

*)To Develop product fast & make process more agile for the market we need to use modern technology, Github is basically used for the Collaboration b/w Development & Operational team.

*)Pair Programing is may be the required technology for the fast response.

 *)SCM(Source Code Manage) is the required to share,push(upload),rollback(getting back to the last verion),changing or adding new idea in it.

 *)It is a open source platform(open to the entire world) when random and Technically talented people can give feedback on your work and can also help you to inhance your knowledge with new ideas.

 *)To need to share code which can be manage we use SCM System.

Github:-

 *)It is the example of SCM used by Cooperate World.

 *)To upload (Push) & Download (Pull) we need some kind of Network(Internet,LAN).

 *)Github is centralized SCM System.


Repository:-

*)A github repository is just a "directory" where files and folders can exist. Other people can create their own copies of this "directory" and modify it as they wish(if it repo. public), then request that their changes get put into the main repositor.It also manage the version of file.


Versioning:-

 *)This is the main feature of SCM (ex:Github) which will help us in maintaning the record of our old Code (or last version of Code).

 *)Versioning makes Roll back more easier for developer.

  It maintain history and latest data or version is known as HEAD.

 *)It is also known as VCS (Version Control System) for ex: Github


Git:-

 *)It is also knows as Decentralized VCS.

 *)It makes a repository in our local system called Local repository.

 *)It work on "Pier-to-Pier" connectivity.

 *)Their is Software called Git through which we can maintain our repo.(in Windows) but linux has a inbuild git software.(link to download:- link )

 *)As we are using Virtual box for another OS (in this program redhat) so we also need to install git in it.


  Commands:- *Dnf install git (for installation)

             *git version (to check the version)

Local repo. Is divided into 3 stages:-

1) Work space

2) Staging area

3) Commit area


Work space:-

It is also know as working area where we Edit our files.


Staging area:-

Staging area basically track all the activities done inside the file like:-

? Staging helps you in split up one large changes into multiple commits.

? It helps in reviewing change and when a merge has conflict

? it helps you to sneak in small changes.


Commit area:-

It like a data base where all the data of git(version) is saved is known as Commit area.

It has all the record of version of a file.


To upload the file from git to github we use

Command :-. *git push

Now it will upload the desired file by create a new file in github.

And if we need to update the old version of file from a new one.

Command :-  *git commit "file name" -m"new title of new version"


Roll back:-

To get old version of your file we need to tell commit id to the HEAD.

Command:- *git reset "commit id" "filename"

This command is used to take the HEAD to your desired Commit id.


------Thats all for this Blog------

Well done

回复

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

Abhilash Sharma的更多文章

社区洞察

其他会员也浏览了