<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>branch &#8211; Best DevOps</title>
	<atom:link href="https://www.bestdevops.com/tag/branch/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.bestdevops.com</link>
	<description>Lets Learn, Do it &#38; Share! Thats a Best DevOps!!!</description>
	<lastBuildDate>Thu, 23 Dec 2021 05:08:53 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.2</generator>
	<item>
		<title>How to add GitHub project to eclipse? Part 02</title>
		<link>https://www.bestdevops.com/how-to-add-github-project-to-eclipse-part-02/</link>
		
		<dc:creator><![CDATA[rahulkr]]></dc:creator>
		<pubDate>Tue, 21 Dec 2021 08:45:02 +0000</pubDate>
				<category><![CDATA[GitHub]]></category>
		<category><![CDATA[branch]]></category>
		<category><![CDATA[Commit]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[repository]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=22579</guid>

					<description><![CDATA[Hello everyone, welcome to the next level of programming. In today articles, we are going to give you lessons on [&#8230;]]]></description>
										<content:encoded><![CDATA[
<div class="wp-block-image"><figure class="aligncenter size-large is-resized"><img fetchpriority="high" decoding="async" src="https://www.bestdevops.com/wp-content/uploads/2021/12/maxresdefault-1024x576.jpg" alt="" class="wp-image-22584" width="734" height="412" srcset="https://www.bestdevops.com/wp-content/uploads/2021/12/maxresdefault-1024x576.jpg 1024w, https://www.bestdevops.com/wp-content/uploads/2021/12/maxresdefault-300x169.jpg 300w, https://www.bestdevops.com/wp-content/uploads/2021/12/maxresdefault-768x432.jpg 768w, https://www.bestdevops.com/wp-content/uploads/2021/12/maxresdefault-375x210.jpg 375w, https://www.bestdevops.com/wp-content/uploads/2021/12/maxresdefault.jpg 1280w" sizes="(max-width: 734px) 100vw, 734px" /></figure></div>



<p class="wp-block-paragraph">Hello everyone, welcome to the next level of programming. In today articles, we are going to give you lessons on various topics as how you add your GitHub project to eclipse and how can we create a GitHub repository how do we clone the repository in eclipse how can we add the eclipse project to GitHub, and then how we can finally commit push and pull. So, let’s start. &nbsp;</p>



<h2 class="wp-block-heading">How to create a GitHub repository?</h2>



<p class="wp-block-paragraph">Step number one is.</p>



<p class="wp-block-paragraph"><strong>Step 1: Create a GitHub account with a sign in</strong></p>



<p class="wp-block-paragraph">You will have to create an account on GitHub so, you will go to your browser and you will go to <a href="https://www.devopsschool.com/">GitHub</a> so, you will say GitHub and the very first website you will get that and github.com so, you will go there and you will create your account so, you will add your you will pick a username you can give some email id or valid email id and then choose a password and then you will sign up for GitHub you will get a link in your email to verify your account and then you will verify and then finally you will sign in so you already will have an account so you will just sign in to your account and now there you will get that page and there you will see that start a project a button so, this is the step no. two</p>



<p class="wp-block-paragraph"><strong>Step 2: Start a project = create a repository</strong></p>



<p class="wp-block-paragraph">Then you will have to start a new project so you will go and start a new a project and you can give any name so you will give that is a test project and then you will give some description which will optional and make it public and then you will create the repository so click on create a repository and there you will have that new repository and you will have a link of that repository there so now you will go back.</p>



<h2 class="wp-block-heading">How to clone the repository in eclipse?</h2>



<p class="wp-block-paragraph">Now, what will you do is step number three is</p>



<p class="wp-block-paragraph"><strong>Step 3: Start eclipse</strong></p>



<p class="wp-block-paragraph">You will start your eclipse so you will go to your eclipse now so that will be an eclipse and you will have to go to git repository perspective so will you see this open perspective button there you will click on that open perspective and then you from there you will have to select git repository also you will start typing git repository there and you will get this perspective and git repository so select git repositories and there you will get that git repositories window and there you will have buttons so that will be an add an existing local git repository that button will be to clone of your git repository and the clone to this view and then you will have to create you git repository so in your case you will already have created your git repository so you will click on that clone or git repository and add that grown to that view so you will click there and before you will add so step no. four will be</p>



<p class="wp-block-paragraph"><strong>Step 4: Go to perspective &gt;&gt; git repositories and click on add git repository</strong></p>



<p class="wp-block-paragraph">Now, you will add the URL there so you will copy that URL from there that just copy it from there and then go back to eclipse and just paste it there it will take all the hosts and repository path itself and then you will give your authentication which will be your user and the password of GitHub account and even if you will not give it will ask you later on so if you will say next there so it will search for the repository and then finally it will have given you that window you will select next again and then it will give you the local directory so you will change that if you want and then you will say finish and you will see that progress there so it will be cloning the repository from the GitHub remote repository and finally you will see that project will have come there so you will have got your repository into your eclipse now the next thing is you will have to create a project in eclipse and add to this repository. I hope, all this will make you more eager to learn about what you can do with GitHub projects and eclipse.</p>



<h2 class="wp-block-heading">How to add eclipse project to GitHub repository?<strong></strong></h2>



<p class="wp-block-paragraph">So, step no. five is</p>



<p class="wp-block-paragraph"><strong>Step 5: Create a project in eclipse</strong></p>



<p class="wp-block-paragraph">So, you will create any project so you will say new java project you will also click there file new and then select the java project so there you will give some name you will give the same name as well that will test project and say finish so you will have got your test project there now what you will do is you will do a right click on that project and then you will go to team and then you will select share project and there it will ask you for the repository and now you will see you will have caught that test project repository there and that will be displayed only once you will have added project in the repository or you will have clone the repository so just select that repository and then you will say finish and now this project will be added to that repository and you will see that icon has also been changed now if you will back to your repository on GitHub and you will refresh it you will not find anything any change there as of now the reason is because you do will have not done any commit or you will have not done any push to the repository so as of now that will be that will look like as before so you will see that will be the same view. Let me add the steps so step no. 6 will be</p>



<p class="wp-block-paragraph"><strong>Step 6: Do a right-click on project &gt;&gt; share &gt;&gt; Add to Git repository</strong></p>



<p class="wp-block-paragraph">And finally you will do some changes or you will do a commit so, you will do a commit first so you will again do a right-click and go to team and now you will see you will have got all these options and that will come only after you will have added the project to the repository so now you will click on commit and now it will have given you all these changes or additions that you will have done you will select all or you will select the ones that you want to commit and drag and drop to the stage changes area so now you will have staged that you will also add some commit message first commit and then you will do commit and then push or you will do commit and push at one go so you will say commit and push and it will give you that dialog boxes you will say next so you will write it down and it will ask you for the username and password and there will be user and password of your GitHub so your username will whatever and you will add your password and now finally it will give you the branch and as of now you will have only master branch so you will say finish and you will see you will give your username and password again and you will also store this username and password so you will not have to give it every time but as of now you will just give it and you will see the progress there and meanwhile that will have done. &nbsp;&nbsp;&nbsp;</p>



<h2 class="wp-block-heading">How to commit, push and pull the changes?</h2>



<p class="wp-block-paragraph">Then step no. seven will be</p>



<p class="wp-block-paragraph"><strong>Step 7: commit and push the project to the repository</strong></p>



<p class="wp-block-paragraph">You will add commit and push the project to the repository and then step 8 will be whenever you will make any change</p>



<p class="wp-block-paragraph"><strong>Step 8: commit and push every change to the repository</strong></p>



<p class="wp-block-paragraph"> So as of now that will have done and now if you will go to your repository and refresh it you will see that would now show you your project and as well as your commit so you will refresh and see and definitely you will see that you will have got your test project there if you will click there you will get that details inside that test project and you will see all these details and also you will see the first commit there which will have happened just two minutes ago and now if you will make any changes for example: you will create a new class there so you will create a new test class there and now and anytime &amp; every time you will make any change you will just go to do a right click on the project go to team you will say commit and you will see that will show you the changes and you will then add a message added class test dot java and then commit and push so that will commit you will add your username and password and that would commit the changes again to the remote repository and if you will go back to your remote repository and refresh that again you will now see you will have got that change added class test java and if you will go inside the source you will have your test dot java class there so this is how you will make sure all your changes will be committed to your remote repository and this is how you will do a pull push and commit so you will also for example: go to team and then you will have all these options there you will do a pull you will pull or push from a particular branch and then you will commit in all these changes this is how you will add your GitHub project to eclipse and then will push and pull so, I hope, all these lessons will be beneficial for you. These fundamental steps will give you the correct path in the journey of adding the GitHub project to eclipse.</p>



<h4 class="wp-block-heading">Related video: </h4>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe  id="_ytid_42813"  width="675" height="379"  data-origwidth="675" data-origheight="379" src="https://www.youtube.com/embed/IriVpSLSPpk?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe>
</div></figure>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to fork a project on Gitlab?</title>
		<link>https://www.bestdevops.com/how-to-fork-a-project-on-gitlab/</link>
		
		<dc:creator><![CDATA[rahulkr]]></dc:creator>
		<pubDate>Mon, 22 Nov 2021 14:57:33 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<category><![CDATA[branch]]></category>
		<category><![CDATA[Fork]]></category>
		<category><![CDATA[GitLab]]></category>
		<category><![CDATA[merge]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[Source]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=22449</guid>

					<description><![CDATA[Hello, my dear friends, welcome to the most abundant part of programming that makes your life very great with enormous [&#8230;]]]></description>
										<content:encoded><![CDATA[
<div class="wp-block-image"><figure class="aligncenter size-full is-resized"><img decoding="async" src="https://www.bestdevops.com/wp-content/uploads/2021/11/eXMy_SuLSZgHBamI_KFu7I9QtT5bUQIEXfhCvrDyT2I.png" alt="" class="wp-image-22451" width="825" height="343" srcset="https://www.bestdevops.com/wp-content/uploads/2021/11/eXMy_SuLSZgHBamI_KFu7I9QtT5bUQIEXfhCvrDyT2I.png 640w, https://www.bestdevops.com/wp-content/uploads/2021/11/eXMy_SuLSZgHBamI_KFu7I9QtT5bUQIEXfhCvrDyT2I-300x125.png 300w" sizes="(max-width: 825px) 100vw, 825px" /></figure></div>



<p class="wp-block-paragraph">Hello, my dear friends, welcome to the most abundant part of programming that makes your life very great with enormous pleasure because this is the place where everyone should want to know that what is worth it? and how it plays an important role in real life. So, today we will learn about how can you fork a <a href="https://www.devopsschool.com/">project</a> and manage them. For this, I will go very basic step by step. I wish that you will read it till the end.</p>



<h2 class="wp-block-heading">What is a fork?</h2>



<p class="wp-block-paragraph">Let’s understand this. In very simple words, a fork is a copy of a project, forking a pro/repo allows you to make changes without affecting the original project or copy. Whenever you want to make changes to the project or you do not want to change anything in the original copy then you can create a fork that you can create a copy and make your changes. And later on, you can merge with the original project as well.</p>



<h2 class="wp-block-heading">How to fork a project?</h2>



<p class="wp-block-paragraph">So, here is step no.1</p>



<p class="wp-block-paragraph">Step 1: <strong>log in to Gitlab and go to your project</strong></p>



<p class="wp-block-paragraph">So, you will go to your Gitlab and sign in or log in with your credentials. And then you will go to your project where there will be your single project. You can also go from there with the above project option. You will see, your project will be there then you can also go to your projects from there as well.</p>



<p class="wp-block-paragraph">Step 2: <strong>Click on the fork button</strong></p>



<p class="wp-block-paragraph">So, there on your projects. You will see, there will be a button. That will be a fork, in your project. When you will click on that button then you will get a message like No spaces available for the name to fork the project.</p>



<p class="wp-block-paragraph">I tell you that what will you do? When you will see a message like this. You will see a group option on the top menu then you will click on your groups. And once, you will have it on the group screen. You will see the New Group option beside the corner. Then, you will click on that and give your group name and description. If you want to keep public or private, you can do that with one click. So, your group will have created at that time. If you will go back to your project and there you will again click on the fork option. So, they will ask to select a namespace to fork the project and you will see, your created group will be there. Then you will see that the project has successfully forked. You can also create merge requests over there.</p>



<p class="wp-block-paragraph">For example, On the copy of the project, you can make some changes, and once, you have to change. If you create a merge request to merge with your original branch. Then you will do a new merge request so, you will select source branch and branch name and after that, you will also select the target branch &amp; their name. And you will click on <strong><em>compare branches &amp; continue. </em></strong>If any changes will have been done there so, it will see in that but you will have not done any changes in the copied or forked project. Then, it will show you as usual. If you have done any changes in that &amp; you will do submit a merge request then you will have to realize the changes and you can submit back. And this is how you can do forking of a project and a copy of the project.</p>



<h4 class="wp-block-heading">Related video:</h4>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy"  id="_ytid_94671"  width="675" height="379"  data-origwidth="675" data-origheight="379" src="https://www.youtube.com/embed/0oo3Q2L4i4M?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe>
</div></figure>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How can you work with Gerrit code review?</title>
		<link>https://www.bestdevops.com/how-can-you-work-with-gerrit-code-review/</link>
		
		<dc:creator><![CDATA[rahulkr]]></dc:creator>
		<pubDate>Wed, 17 Nov 2021 12:30:23 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<category><![CDATA[branch]]></category>
		<category><![CDATA[Code Review]]></category>
		<category><![CDATA[committed]]></category>
		<category><![CDATA[Developer]]></category>
		<category><![CDATA[Gerrit]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[repository]]></category>
		<category><![CDATA[Source Code]]></category>
		<category><![CDATA[version-control]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=22384</guid>

					<description><![CDATA[Welcome to the introductory part of Gerrit. In this article, we would cover all the prominent spaces regarding Gerrit, why [&#8230;]]]></description>
										<content:encoded><![CDATA[
<div class="wp-block-image"><figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" src="https://www.bestdevops.com/wp-content/uploads/2021/11/gerrit-code-review-3.2-intro-1-1024x387.png" alt="" class="wp-image-22390" width="825" height="311" srcset="https://www.bestdevops.com/wp-content/uploads/2021/11/gerrit-code-review-3.2-intro-1-1024x387.png 1024w, https://www.bestdevops.com/wp-content/uploads/2021/11/gerrit-code-review-3.2-intro-1-300x113.png 300w, https://www.bestdevops.com/wp-content/uploads/2021/11/gerrit-code-review-3.2-intro-1-768x290.png 768w, https://www.bestdevops.com/wp-content/uploads/2021/11/gerrit-code-review-3.2-intro-1-1536x580.png 1536w, https://www.bestdevops.com/wp-content/uploads/2021/11/gerrit-code-review-3.2-intro-1-2048x773.png 2048w" sizes="auto, (max-width: 825px) 100vw, 825px" /></figure></div>



<p class="wp-block-paragraph">Welcome to the introductory part of Gerrit. In this article, we would cover all the prominent spaces regarding Gerrit, why use Gerrit? About a code review, and some basic Gerrit terminology.</p>



<h2 class="wp-block-heading">What is Gerrit?</h2>



<p class="wp-block-paragraph">Let’s start with the introduction of Gerrit? Now, take a brief action on <a href="https://www.devopsschool.com/">Gerrit</a>, it is a source code management (SCM) platform that is like a GitHub, bit bucket, or team foundation server in that it manages multiple repositories, tags, branches, and other git resources for multiple projects. Its version control system is GIT. It provides you with an optional code review workflow and access control on git repositories that store changes before they are committed to repository branches. It is a free open-source development and is used by Google to develop an android operating system. So, it&#8217;s free and available, you can easily download it from google.</p>



<h2 class="wp-block-heading">Why use Gerrit?</h2>



<p class="wp-block-paragraph">Now, we have a second option that comes one after the other why are we using it? There are several patterns or behaviors through which you can judge and manage your possibilities. It provides a lightweight framework for reviewing commits before they are accepted into the GIT repository. One more thing, it is performing that captures the team discussion on code changes through change reviews and is persistent and auditable. It allows flexibility to control team workflows to ensure all code changes go through quality assurance checks. And it manages access controls for GIT repositories, and its web-based interface. After this kind of advancement, developers don’t need any additional tools to interact with Gerrit.</p>



<h2 class="wp-block-heading">What is a code review?</h2>



<p class="wp-block-paragraph">A code review is a process of quality assurance that involves other reading and checking source code to offer suggestions, recommendations, or approvals performing a code review into two stages the first is the latest commit pushed as a change, and the second is kept in a staging area for a review. And under the second stage that will be merged into the repository when approved. Along with code review consist of various functions like comments, approvals/rejections, code quality verification, additional patches to fix issues,  the difference between versions, dependencies, and the changing status.</p>



<h2 class="wp-block-heading">Gerrit terminology</h2>



<p class="wp-block-paragraph">Here is some Gerrit terminology that may come up:</p>



<ul class="wp-block-list"><li><strong>Change:</strong> A change represents a single commit that is under review. Particular change is identified with a change-Id.</li></ul>



<ul class="wp-block-list"><li><strong>Patch set: </strong>Patch sets are subsequent commits that are attempting to amend an existing change.</li></ul>



<h4 class="wp-block-heading">Related video:</h4>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy"  id="_ytid_84894"  width="675" height="379"  data-origwidth="675" data-origheight="379" src="https://www.youtube.com/embed/48a44t_yz5g?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe>
</div></figure>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How can we do branching from the command line?</title>
		<link>https://www.bestdevops.com/how-can-we-do-branching-from-the-command-line/</link>
		
		<dc:creator><![CDATA[rahulkr]]></dc:creator>
		<pubDate>Mon, 15 Nov 2021 10:12:34 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<category><![CDATA[Adding]]></category>
		<category><![CDATA[branch]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[Features]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[GitHub]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[vs code]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=22342</guid>

					<description><![CDATA[Hello techno-friendly users, welcome to the featuring era of programming. Today, we shall raise our points on the topic of [&#8230;]]]></description>
										<content:encoded><![CDATA[
<div class="wp-block-image"><figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" src="https://www.bestdevops.com/wp-content/uploads/2021/11/git-checkout-remote-branches-1024x509.png" alt="" class="wp-image-22351" width="770" height="382" srcset="https://www.bestdevops.com/wp-content/uploads/2021/11/git-checkout-remote-branches-1024x509.png 1024w, https://www.bestdevops.com/wp-content/uploads/2021/11/git-checkout-remote-branches-300x149.png 300w, https://www.bestdevops.com/wp-content/uploads/2021/11/git-checkout-remote-branches-768x382.png 768w, https://www.bestdevops.com/wp-content/uploads/2021/11/git-checkout-remote-branches-1536x764.png 1536w, https://www.bestdevops.com/wp-content/uploads/2021/11/git-checkout-remote-branches-2048x1018.png 2048w" sizes="auto, (max-width: 770px) 100vw, 770px" /></figure></div>



<p class="wp-block-paragraph">Hello techno-friendly users, welcome to the featuring era of programming. Today, we shall raise our points on the topic of branching and how directly you can establish your branch through the git command line without opening the GitHub platform. If you will also unaware to take git branching so, you have difficulties in relation to <a href="https://www.devopsschool.com/">command</a> branching then you can receive every kind of solution related to creating, merging, and adding branches. This is the place where you could get all steps regarding branch creations.</p>



<h2 class="wp-block-heading">Creating branch from the command line</h2>



<p class="wp-block-paragraph">Suppose, you have to make a branch so, let’s have a look that what is branch happening? If you have software and you are working in google and that Google is working in a master branch, all files are running there. Suppose, you want to add a feature in the file but you are not so sure to talking that your boss will give you permission or not. If you do in the main file that will be affected on your main server, the file has become loose then your server will be shut down. So, here comes the talk of the branch, you will make a copy, the branch means making copies of the same file. Then first, you will write git status so, it will show on branch master, nothing to commit. When you will put <strong><em>$ git branch </em></strong>then it will show you in the master branch, if you have to make a branch so, you will put <strong><em>$ git branch update code </em></strong>then update code is branch name happen. So, again, you will run the <strong><em>$ git branch, </em></strong>there will be branches as master and update code that you have been made. If you have to do the switch in the update code so, you will have to put like <strong><em>$ git checkout update code </em></strong>then it will show you switched to branch ‘update code’ option. If you will move in the vs code file, you will do enhances in one then there will not be affected another file. Suppose, you have a file in the name <strong>contact.html</strong>, you have to write anything in that. You have been made a file in the name <strong>comment.html</strong>, you have paste similar code of your file and changed something code in that. If you will run git status then it will show you unstaged, when you will do commit through <strong><em>$ git commit –a –m “this update code files updated”</em></strong>. You will do update put anything message so, again, you will run git status then it will show you untracked files. Then you will first add that by putting <strong><em>$ git add –A</em></strong> when you will run git status, it will show you on branch update code nothing to commit, working tree clean. When you will do switch to the master branch then you will see what will happen with <strong>comment.html</strong> so, you will have to see two branches that you had made by putting <strong><em>$ git branch</em></strong>.</p>



<h2 class="wp-block-heading">Merging two branch command</h2>



<p class="wp-block-paragraph">You had made a file in the name <strong>comment.html </strong>then it will happen in the update code branch. So, again, you will switch by putting <strong><em>$ git checkout master</em></strong> then they will have switched to branch ‘master’. When you will move to the vs code so, the comment.html file will not be there and also not visible in the file explorer because you had not that file in the master branch and you are updating that file in the update code. Again, you will do a checkout to update the code so, that the comment.html file will retrieve again in the vs code. This is the real meaning of branch, you can do switch, comment set up, add features also, and anything you want to do. Differently, you can make replicas of the project doing adding features in that, and after, you can merge them. Now, look at how can you do merge, what is merge means? Suppose, you have a project in the name comment.html in vs code, you have made that. You had made features in that boss has liked most, if they say that you have to give merge that with the master branch so, git has to give it directly. How does it do? So, what will be the command? First, you will see the git log by putting the $ git log then you will see files that will have been committed to those files you have done. By pressing Q, you have to give quit, first, you will have to move master. In master, you have to do merge update code then you will move by putting $ git checkout master so, it will have to give switch.</p>



<p class="wp-block-paragraph"> Now, one command is happen like <strong><em>$ git merge update code</em></strong> then you will have to go in the vs code that file has merged there. When you will have to give a close file from vs code then it will give to see you all files and features that have been added. That files were in an update code, you will see they have been shifted to master, whenever you will put git status then it will see on branch master, working tree clean. When you open vs code by putting <strong><em>$ code.</em></strong> Then you will see comment file will have arrived in the master branch. So, this real meaning happens of merge, it is a very good feature. Suppose, you are making a code differently or doing the work of some other person and after that, you have to do merge all of the codes then only you will put git merge along with branch name and from which branch. It’s happened only, git shows us all work from professionally or the good way how ideally you are making and doing file. Suppose, you have to make a file of a node in that all Html files would work as backhand, you have to do server-side logics and make something in backhand. So, for giving him the layout, you will make a file of nodes. First, separately, you will have to make a branch then you will write <strong><em>$ git branch</em></strong>, and again, you will put <strong><em>$ git branch node integration</em></strong>, your branch will make. You will again put git branch then the branching file will show now, you have to make a file, and the direct switch also. It means that you make a branch, you want to do a switch. So, one command that is happening is <strong><em>$ git –b nodeintegration</em></strong>.</p>



<h2 class="wp-block-heading">Adding JavaScript branch</h2>



<p class="wp-block-paragraph">If you will put <strong><em>$ git –b nodeintegration </em></strong>then it will show checkout changes. When you will do <strong><em>$ git checkout node integration</em></strong> then it will be switched to branch node integration. You will make a file in the name <strong><em>$ touch node.js</em></strong> so, you will see a file has been made in a vs code. Suppose, you have written anything in that like</p>



<p class="wp-block-paragraph"><strong>console.log (“this is the server-side language”) &nbsp;</strong></p>



<p class="wp-block-paragraph"><strong>console.log (“this is git hub training”)</strong></p>



<p class="wp-block-paragraph">You have done a server-side in the node integration branch. Now, what can you do? Normally, you can check that. Suppose, you do <strong><em>$ git checkout master</em></strong> then your file node configuration will vanish from the vs code. You have made a file then first, you will add by putting <strong><em>$ git add –A</em></strong> so, it will come in the staging area. Next, you will do it by putting <strong><em>$ git commit –m “this is server-side js file” </em></strong>then the file will be added so, you have committed all files. Suppose, you have to give branch change by adding $ git checkout master when you do switch from the master then the node.js file will have vanished because your file doesn’t exist in the master branch, it will exist in the node integration. Again, you will put as <strong><em>$ git checkout nodeintegration</em></strong> so, the file will be retrieved again in the vs code. It is the meaning of branch, and merge. You have looked at it.</p>



<h4 class="wp-block-heading">Related video:</h4>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<iframe loading="lazy"  id="_ytid_79977"  width="675" height="379"  data-origwidth="675" data-origheight="379" src="https://www.youtube.com/embed/9oAOou7zUJI?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;rel=1&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;disablekb=0&#038;" class="__youtube_prefs__  epyt-is-override  no-lazyload" title="YouTube player"  allow="fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen data-no-lazy="1" data-skipgform_ajax_framebjll=""></iframe>
</div></figure>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How can you control git commands with examples?</title>
		<link>https://www.bestdevops.com/how-can-you-control-git-commands-with-examples/</link>
		
		<dc:creator><![CDATA[rahulkr]]></dc:creator>
		<pubDate>Tue, 02 Nov 2021 09:53:10 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<category><![CDATA[branch]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[GitHub]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[programmers]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[repository]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=22309</guid>

					<description><![CDATA[Hello techies, welcome to the real world of programming. Today, we are going to talk about the Git command line. [&#8230;]]]></description>
										<content:encoded><![CDATA[
<div class="wp-block-image"><figure class="aligncenter size-full is-resized"><img loading="lazy" decoding="async" src="https://www.bestdevops.com/wp-content/uploads/2021/11/rixan4h4z8y94eq89som.png" alt="" class="wp-image-22311" width="741" height="311" srcset="https://www.bestdevops.com/wp-content/uploads/2021/11/rixan4h4z8y94eq89som.png 1000w, https://www.bestdevops.com/wp-content/uploads/2021/11/rixan4h4z8y94eq89som-300x126.png 300w, https://www.bestdevops.com/wp-content/uploads/2021/11/rixan4h4z8y94eq89som-768x323.png 768w" sizes="auto, (max-width: 741px) 100vw, 741px" /></figure></div>



<p class="wp-block-paragraph">Hello techies, welcome to the real world of programming. Today, we are going to talk about the Git command line. Whether you will read this article fully so, I’ll do promise that you will get all control over the git commands until the end. It means as many commands, after this article, you will learn yourself through the<a href="https://bit.ly/3jZloFi"> command</a> line, you can use full git. It is the best way because if you use GUI directly on any website, GUI comes in understand that all right but doing directly upload, this is not a right way, it is a practical process. What you will do, when the file will be large. This thing we are going to do through git command line that very command comes in the hands of the programmer. If we use a command line. So, let’s start with the elaborative part of this article. This article till the last, if you will have fear regarding command line becomes black from behind so, all your fear will vanishes.</p>



<h2 class="wp-block-heading">How to install git on windows 10? &nbsp;</h2>



<p class="wp-block-paragraph">So, let’s look. What you will do first? First, you will do a search on the web like git for windows download through enter click. You will get all downloads over there. As you will open by clicking the first option then it will directly reach you in windows. And there, your download will be started, what so if you will do manually then <a href="https://www.devopsschool.com/">download</a> will be started. One of the websites like git scm.com, from this you will download that git. So, this is not big stuff to install this, the normal default setting is there next-next as you install. Likely, you will install it. When the git will be downloaded then you will click on it, they will ask for permission. After doing the default setting, next-next, you will install that. When the installation will have done so, you will make a new folder from the name <em>all about git</em>. Under that folder, you will use git. If you want to check git is installed or not then you will do one right-click and you will see two options there like git bash here, and git GUI here. These two commands will come if you will do one right-click. You have a folder from the name <em>all about GIT</em>, if you want to do all work in that folder so, you will use the GIT bash here option according to the git command line, instead of GIT GUI here.</p>



<h2 class="wp-block-heading">GIT command line tutorial</h2>



<p class="wp-block-paragraph">You will open the <em>GIT bash here</em>. There will open with the dialog box, you will do resize with maximize option. What will you do next, firstly, if you would install GIT on your desktop? So, what types of things, you will have to do. That is not so important to do but you have to do so, your name, who are making and uploading on GitHub, all this information comes from there. Now, let’s do configurations of these, first, we shall write like this&nbsp;</p>



<p class="wp-block-paragraph">            <strong><em>$ git config ¥- global user.name Mohan</em></strong> and as you will press the enter key then configuration key name will come like this,</p>



<p class="wp-block-paragraph"><strong><em>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Mohan@LAPTOP- CR327854 MINGw64&nbsp; ~/Desktop/All about git (master)</em></strong></p>



<p class="wp-block-paragraph">Usually, we will do a configuration of email,</p>



<p class="wp-block-paragraph">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong><em>$ git config &#8211; -global user.email <a href="mailto:beaproplayer24@gamil.com">beaproplayer24@gamil.com</a></em></strong> and it will save like this,</p>



<p class="wp-block-paragraph">         <strong><em>Mohan@LAPTOP- CR327854 MINGw64  ~/Desktop/All about git (master). </em></strong>At the apex, there will be written like a master, you will understand about all this thing in upcoming part. How can you make a branch of your own and do a clone of it? Now, you have to check that your configuration has done or not so, you will right like this way, </p>



<p class="wp-block-paragraph">            <strong><em>$ git config &#8211; -global user.name Mohan, </em></strong>only you will write much like then your name will be print like this way,</p>



<p class="wp-block-paragraph">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <strong><em>Mohan@LAPTOP- CR327854 MINGw64&nbsp; ~/Desktop/All about git (master)</em></strong></p>



<h2 class="wp-block-heading"><strong>Git configurations</strong></h2>



<p class="wp-block-paragraph">Now, the Configuration has been done. All that command, you were doing in previous then only you will put some key so, all of your commands will be done. If you put <strong><em>$ code .</em></strong> So, this is a shortcut to open your <strong><em>vs code</em></strong> through the terminal. So, your next query will be what is terminal? It is the terminal of UNIX that you are using in your windows. That terminal in mac which has UNIX- based, that GIT, is also a Unix-based terminal, you can also use it as a terminal. When you put <strong><em>$ code .</em></strong>  In that the vs code will open so, every file you will make in that. Those you want to upload in GitHub so, let’s have a look at how you can do that. If the new file you have to make, whenever you use GIT then what command do you move in first.</p>



<h2 class="wp-block-heading">Initializing GIT repository</h2>



<p class="wp-block-paragraph">Whenever you make a repository, what command do you make first? A repository is a folder in that your projects may exist, whenever you move GIT. So, to the name of <em><strong>$ git init,</strong></em> you have to move that. When you do GIT init then there will come in written like <em>initialized empty GIT repository in C: /users/Mohan/Desktop/All about GIT/.git/</em> it means to the name.GIT folder has come in file explorer but you will not see then after doing click on hidden items then to the name.GIT folder will have arrived there but you will not tease them and will hide them again. So that, you will again go to the command line and you want to see in the command line what type of folder is hidden there. So, there will be commands like <em><strong>$ ls &#8211; lart,</strong></em> all your hidden files will show you. This is the command, you can easily get it. There is a command, you will always use in GIT for knowing status such as <em><strong>$ git status</strong></em> then it will show information like branch master, commit yet, and untracked files. These all happen as untracked, modified, unmodified, and staged areas, firstly you, let&#8217;s understand about this. You have made a command line, installed and you are using it.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
