<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://hpc-wiki.info/hpc/index.php?action=history&amp;feed=atom&amp;title=Git_Tutorials%2FBranching</id>
	<title>Git Tutorials/Branching - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://hpc-wiki.info/hpc/index.php?action=history&amp;feed=atom&amp;title=Git_Tutorials%2FBranching"/>
	<link rel="alternate" type="text/html" href="https://hpc-wiki.info/hpc/index.php?title=Git_Tutorials/Branching&amp;action=history"/>
	<updated>2026-04-16T03:36:57Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.9</generator>
	<entry>
		<id>https://hpc-wiki.info/hpc/index.php?title=Git_Tutorials/Branching&amp;diff=4943&amp;oldid=prev</id>
		<title>Kamil-braschke-0d3e@uni-wuppertal.de at 14:23, 1 September 2022</title>
		<link rel="alternate" type="text/html" href="https://hpc-wiki.info/hpc/index.php?title=Git_Tutorials/Branching&amp;diff=4943&amp;oldid=prev"/>
		<updated>2022-09-01T14:23:28Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://hpc-wiki.info/hpc/index.php?title=Git_Tutorials/Branching&amp;amp;diff=4943&amp;amp;oldid=4942&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Kamil-braschke-0d3e@uni-wuppertal.de</name></author>
	</entry>
	<entry>
		<id>https://hpc-wiki.info/hpc/index.php?title=Git_Tutorials/Branching&amp;diff=4942&amp;oldid=prev</id>
		<title>Kamil-braschke-0d3e@uni-wuppertal.de at 09:45, 1 September 2022</title>
		<link rel="alternate" type="text/html" href="https://hpc-wiki.info/hpc/index.php?title=Git_Tutorials/Branching&amp;diff=4942&amp;oldid=prev"/>
		<updated>2022-09-01T09:45:45Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://hpc-wiki.info/hpc/index.php?title=Git_Tutorials/Branching&amp;amp;diff=4942&amp;amp;oldid=4939&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Kamil-braschke-0d3e@uni-wuppertal.de</name></author>
	</entry>
	<entry>
		<id>https://hpc-wiki.info/hpc/index.php?title=Git_Tutorials/Branching&amp;diff=4939&amp;oldid=prev</id>
		<title>Kamil-braschke-0d3e@uni-wuppertal.de at 12:42, 25 August 2022</title>
		<link rel="alternate" type="text/html" href="https://hpc-wiki.info/hpc/index.php?title=Git_Tutorials/Branching&amp;diff=4939&amp;oldid=prev"/>
		<updated>2022-08-25T12:42:29Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:42, 25 August 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l3&quot; &gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Syllabus Git Tutorials}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Syllabus Git Tutorials}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:Git_tutorial_-_branching.png|thumb|700px|Figure 1: Example of basic workflow with branching. The figure can show a local or a remote repository omitting depictions of commit and push operations to keep it simple (they happen somewhere on the dashed lines). Initially, two branches are created from the main branch. Two independent developments occur on those new branches visualized by the different colors green and orange. Theses branches can both belong to one or to two different developers. Once the green segment is finished, its contribution is &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pulled &lt;/del&gt;into the main branch and work on the green segment branch stops. On the other side, the orange segment is developed simultaneously. When development is finished, a new branch is created from this branch. Instead of directly &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pulling &lt;/del&gt;the orange branch into the main branch it continues development on some light purple features while in parallel some brown features are added to orange (e.g., solving bugs in orange code). Later, a &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pull &lt;/del&gt;operation &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;merges &lt;/del&gt;the orange/brown and orange/purple branch together and &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;afterwards &lt;/del&gt;those orange/brown/purple changes are &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pulled &lt;/del&gt;into the main branch. At this point the main branch will contain contributions from all branches. Unlike the green branch, the orange/brown/purple branch continues to exist, because its purple features are still expanded and will later be &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;pulled &lt;/del&gt;again into the main branch.]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:Git_tutorial_-_branching.png|thumb|700px|Figure 1: Example of basic workflow with branching. The figure can show a local or a remote repository omitting depictions of commit and push operations to keep it simple (they happen somewhere on the dashed lines). Initially, two branches are created from the main branch. Two independent developments occur on those new branches visualized by the different colors green and orange. Theses branches can both belong to one or to two different developers. Once the green segment is finished, its contribution is &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;merged &lt;/ins&gt;into the main branch and work on the green segment branch stops. On the other side, the orange segment is developed simultaneously. When development is finished, a new branch is created from this branch. Instead of directly &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;merging &lt;/ins&gt;the orange branch into the main branch it continues development on some light purple features while in parallel some brown features are added to orange (e.g., solving bugs in orange code). Later, a &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;merge &lt;/ins&gt;operation &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;combines &lt;/ins&gt;the orange/brown and orange/purple branch together and &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;subsequently &lt;/ins&gt;those orange/brown/purple changes are &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;merged &lt;/ins&gt;into the main branch &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;as well&lt;/ins&gt;. At this point the main branch will contain contributions from all branches. Unlike the green branch, the orange/brown/purple branch continues to exist, because its purple features are still expanded and will later be &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;merged &lt;/ins&gt;again into the main branch.]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Branching is an important feature of Git, which enables simultaneous work on different parts of a code with minimal interference between acting parties. As the name implies, branching refers to the creation of a separate line of repository tracking that branches of from your &amp;quot;main&amp;quot; repository (also called a branch, but can be understood as the trunk). When developing new features you do not necessarily want to directly &amp;lt;syntaxhighlight inline&amp;gt;commit&amp;lt;/syntaxhighlight&amp;gt;  your changes to &amp;quot;main&amp;quot;, because they might interfere with your colleagues contribution of other features on a different branch. Even when differences do not directly interfere, they can still lead to a more cumbersome &amp;lt;syntaxhighlight inline&amp;gt;merge&amp;lt;/syntaxhighlight&amp;gt; of both branches into &amp;quot;main&amp;quot;, once all changes are complete. In larger projects this &amp;lt;syntaxhighlight inline&amp;gt;merge&amp;lt;/syntaxhighlight&amp;gt; &amp;#039;&amp;#039;ing&amp;#039;&amp;#039; into the &amp;quot;main&amp;quot; branch is often blocked for most users. A so-called &amp;lt;syntaxhighlight inline&amp;gt;pull&amp;lt;/syntaxhighlight&amp;gt; request must be made, so that a responsible person can &amp;lt;syntaxhighlight inline&amp;gt;pull&amp;lt;/syntaxhighlight&amp;gt; your changes from your branch into &amp;quot;main&amp;quot;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Branching is an important feature of Git, which enables simultaneous work on different parts of a code with minimal interference between acting parties. As the name implies, branching refers to the creation of a separate line of repository tracking that branches of from your &amp;quot;main&amp;quot; repository (also called a branch, but can be understood as the trunk). When developing new features you do not necessarily want to directly &amp;lt;syntaxhighlight inline&amp;gt;commit&amp;lt;/syntaxhighlight&amp;gt;  your changes to &amp;quot;main&amp;quot;, because they might interfere with your colleagues contribution of other features on a different branch. Even when differences do not directly interfere, they can still lead to a more cumbersome &amp;lt;syntaxhighlight inline&amp;gt;merge&amp;lt;/syntaxhighlight&amp;gt; of both branches into &amp;quot;main&amp;quot;, once all changes are complete. In larger projects this &amp;lt;syntaxhighlight inline&amp;gt;merge&amp;lt;/syntaxhighlight&amp;gt; &amp;#039;&amp;#039;ing&amp;#039;&amp;#039; into the &amp;quot;main&amp;quot; branch is often blocked for most users. A so-called &amp;lt;syntaxhighlight inline&amp;gt;pull&amp;lt;/syntaxhighlight&amp;gt; request must be made, so that a responsible person can &amp;lt;syntaxhighlight inline&amp;gt;pull&amp;lt;/syntaxhighlight&amp;gt; your changes from your branch &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;and &amp;lt;syntaxhighlight inline&amp;gt;merge&amp;lt;/syntaxhighlight&amp;gt; them &lt;/ins&gt;into &amp;quot;main&amp;quot;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To view all existing branches use the &amp;lt;syntaxhighlight inline&amp;gt;git branch --list&amp;lt;/syntaxhighlight&amp;gt; command:&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To view all existing branches use the &amp;lt;syntaxhighlight inline&amp;gt;git branch --list&amp;lt;/syntaxhighlight&amp;gt; command:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key hpc_wiki:diff::1.12:old-4937:rev-4939 --&gt;
&lt;/table&gt;</summary>
		<author><name>Kamil-braschke-0d3e@uni-wuppertal.de</name></author>
	</entry>
	<entry>
		<id>https://hpc-wiki.info/hpc/index.php?title=Git_Tutorials/Branching&amp;diff=4937&amp;oldid=prev</id>
		<title>Kamil-braschke-0d3e@uni-wuppertal.de at 12:04, 25 August 2022</title>
		<link rel="alternate" type="text/html" href="https://hpc-wiki.info/hpc/index.php?title=Git_Tutorials/Branching&amp;diff=4937&amp;oldid=prev"/>
		<updated>2022-08-25T12:04:45Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:04, 25 August 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot; &gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{DISPLAYTITLE:Git Tutorial: Branching}}&amp;lt;nowiki /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{DISPLAYTITLE:Git Tutorial: Branching}}&amp;lt;nowiki /&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Syllabus Git Tutorials}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Syllabus Git Tutorials}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[File:Git_tutorial_-_branching.png|thumb|700px|Figure 1: Example of basic workflow with branching. The figure can show a local or a remote repository omitting depictions of commit and push operations to keep it simple (they happen somewhere on the dashed lines). Initially, two branches are created from the main branch. Two independent developments occur on those new branches visualized by the different colors green and orange. Theses branches can both belong to one or to two different developers. Once the green segment is finished, its contribution is pulled into the main branch and work on the green segment branch stops. On the other side, the orange segment is developed simultaneously. When development is finished, a new branch is created from this branch. Instead of directly pulling the orange branch into the main branch it continues development on some light purple features while in parallel some brown features are added to orange (e.g., solving bugs in orange code). Later, a pull operation merges the orange/brown and orange/purple branch together and afterwards those orange/brown/purple changes are pulled into the main branch. At this point the main branch will contain contributions from all branches. Unlike the green branch, the orange/brown/purple branch continues to exist, because its purple features are still expanded and will later be pulled again into the main branch.]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Branching is an important feature of Git, which enables simultaneous work on different parts of a code with minimal interference between acting parties. As the name implies, branching refers to the creation of a separate line of repository tracking that branches of from your &amp;quot;main&amp;quot; repository (also called a branch, but can be understood as the trunk). When developing new features you do not necessarily want to directly &amp;lt;syntaxhighlight inline&amp;gt;commit&amp;lt;/syntaxhighlight&amp;gt;  your changes to &amp;quot;main&amp;quot;, because they might interfere with your colleagues contribution of other features on a different branch. Even when differences do not directly interfere, they can still lead to a more cumbersome &amp;lt;syntaxhighlight inline&amp;gt;merge&amp;lt;/syntaxhighlight&amp;gt; of both branches into &amp;quot;main&amp;quot;, once all changes are complete. In larger projects this &amp;lt;syntaxhighlight inline&amp;gt;merge&amp;lt;/syntaxhighlight&amp;gt; &amp;#039;&amp;#039;ing&amp;#039;&amp;#039; into the &amp;quot;main&amp;quot; branch is often blocked for most users. A so-called &amp;lt;syntaxhighlight inline&amp;gt;pull&amp;lt;/syntaxhighlight&amp;gt; request must be made, so that a responsible person can &amp;lt;syntaxhighlight inline&amp;gt;pull&amp;lt;/syntaxhighlight&amp;gt; your changes from your branch into &amp;quot;main&amp;quot;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Branching is an important feature of Git, which enables simultaneous work on different parts of a code with minimal interference between acting parties. As the name implies, branching refers to the creation of a separate line of repository tracking that branches of from your &amp;quot;main&amp;quot; repository (also called a branch, but can be understood as the trunk). When developing new features you do not necessarily want to directly &amp;lt;syntaxhighlight inline&amp;gt;commit&amp;lt;/syntaxhighlight&amp;gt;  your changes to &amp;quot;main&amp;quot;, because they might interfere with your colleagues contribution of other features on a different branch. Even when differences do not directly interfere, they can still lead to a more cumbersome &amp;lt;syntaxhighlight inline&amp;gt;merge&amp;lt;/syntaxhighlight&amp;gt; of both branches into &amp;quot;main&amp;quot;, once all changes are complete. In larger projects this &amp;lt;syntaxhighlight inline&amp;gt;merge&amp;lt;/syntaxhighlight&amp;gt; &amp;#039;&amp;#039;ing&amp;#039;&amp;#039; into the &amp;quot;main&amp;quot; branch is often blocked for most users. A so-called &amp;lt;syntaxhighlight inline&amp;gt;pull&amp;lt;/syntaxhighlight&amp;gt; request must be made, so that a responsible person can &amp;lt;syntaxhighlight inline&amp;gt;pull&amp;lt;/syntaxhighlight&amp;gt; your changes from your branch into &amp;quot;main&amp;quot;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l10&quot; &gt;Line 10:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 12:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;We can see that currently the project contains only one branch called &amp;quot;main&amp;quot; (line 2). The &amp;quot;*&amp;quot; next to it is used to mark our current branch.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;We can see that currently the project contains only one branch called &amp;quot;main&amp;quot; (line 2). The &amp;quot;*&amp;quot; next to it is used to mark our current branch&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;. Before we continue with the tutorial, a look at Figure 1 might be helpful. It visualizes the basic idea behind branching within a repository. Moreover, we can see the similarities between the relation of other branches to the main branch and the relation of a local repository to the remote repository&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Handling Branches ==  &lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Handling Branches ==  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l40&quot; &gt;Line 40:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 42:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Keep in mind that a &amp;lt;syntaxhighlight inline&amp;gt;git checkout &amp;lt;name of branch&amp;gt;&amp;lt;/syntaxhighlight&amp;gt; is not like a &amp;lt;syntaxhighlight inline&amp;gt;git clone&amp;lt;/syntaxhighlight&amp;gt; operation and therefore does not make a full copy of a different code branch. Instead, it tracks the &amp;lt;syntaxhighlight inline&amp;gt;commit&amp;lt;/syntaxhighlight&amp;gt; history of the chosen branch and reproduces the changes in your repository. Any modifications you &amp;lt;syntaxhighlight inline&amp;gt;commit&amp;lt;/syntaxhighlight&amp;gt; now will be added to that branch.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Keep in mind that a &amp;lt;syntaxhighlight inline&amp;gt;git checkout &amp;lt;name of branch&amp;gt;&amp;lt;/syntaxhighlight&amp;gt; is not like a &amp;lt;syntaxhighlight inline&amp;gt;git clone&amp;lt;/syntaxhighlight&amp;gt; operation and therefore does not make a full copy of a different code branch. Instead, it tracks the &amp;lt;syntaxhighlight inline&amp;gt;commit&amp;lt;/syntaxhighlight&amp;gt; history of the chosen branch and reproduces the changes in your repository. Any modifications you &amp;lt;syntaxhighlight inline&amp;gt;commit&amp;lt;/syntaxhighlight&amp;gt; now will be added to that branch.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{| role=&amp;quot;presentation&amp;quot; class=&amp;quot;wikitable mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:62em&amp;quot; data-expandtext=&amp;quot;&amp;amp;#9660;&amp;quot; data-collapsetext=&amp;quot;&amp;amp;#9650;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{| role=&amp;quot;presentation&amp;quot; class=&amp;quot;wikitable mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;background-color:white; &lt;/ins&gt;width:62em&amp;quot; data-expandtext=&amp;quot;&amp;amp;#9660;&amp;quot; data-collapsetext=&amp;quot;&amp;amp;#9650;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|+ style=&amp;quot;background-color:#2e3871; color:white;text-align: center; width:10em&amp;quot;| &amp;lt;strong&amp;gt;Further remarks&amp;lt;/strong&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|+ style=&amp;quot;background-color:#2e3871; color:white;text-align: center; width:10em&amp;quot;| &amp;lt;strong&amp;gt;Further remarks&amp;lt;/strong&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l47&quot; &gt;Line 47:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 49:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Usually, a branch is created from the most recent commit of the branch you are currently on. If we want to create it from a different branch (and switch to it), we will have to use {{Avoid wrap|&amp;lt;syntaxhighlight inline&amp;gt;git checkout -b ＜name of new branch＞ ＜name of different branch＞&amp;lt;/syntaxhighlight&amp;gt;}}.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Usually, a branch is created from the most recent commit of the branch you are currently on. If we want to create it from a different branch (and switch to it), we will have to use {{Avoid wrap|&amp;lt;syntaxhighlight inline&amp;gt;git checkout -b ＜name of new branch＞ ＜name of different branch＞&amp;lt;/syntaxhighlight&amp;gt;}}.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| To delete a branch we type {{Avoid wrap|&amp;lt;syntaxhighlight inline&amp;gt;git branch -d &amp;lt;name of branch&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;}}.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| To delete a branch we type {{Avoid wrap|&amp;lt;syntaxhighlight inline&amp;gt;git branch -d &amp;lt;name of branch&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;}}. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;However, this will not be possible if the branch contains uncommitted changes. We either have to perform a &amp;lt;syntaxhighlight inline&amp;gt;commit&amp;lt;/syntaxhighlight&amp;gt; first or use the option &amp;lt;syntaxhighlight inline&amp;gt;-D&amp;lt;/syntaxhighlight&amp;gt; instead of &amp;lt;syntaxhighlight inline&amp;gt;-d&amp;lt;/syntaxhighlight&amp;gt;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|-&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;| Deleting a branch as shown above only deletes its local version. A remote branch has to be deleted this way: {{Avoid wrap|&amp;lt;syntaxhighlight inline&amp;gt;git push &amp;lt;name of remote repository&amp;gt; --delete &amp;lt;name of remote branch&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Renaming our current branch is done through the command {{Avoid wrap|&amp;lt;syntaxhighlight inline&amp;gt;git branch -m &amp;lt;new name of branch&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;}}.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;| Renaming our current branch is done through the command {{Avoid wrap|&amp;lt;syntaxhighlight inline&amp;gt;git branch -m &amp;lt;new name of branch&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;}}.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l115&quot; &gt;Line 115:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 119:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{| role=&amp;quot;presentation&amp;quot; class=&amp;quot;wikitable mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;60em&lt;/del&gt;&amp;quot; data-expandtext=&amp;quot;&amp;amp;#9660;&amp;quot; data-collapsetext=&amp;quot;&amp;amp;#9650;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{| role=&amp;quot;presentation&amp;quot; class=&amp;quot;wikitable mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;background-color:white; &lt;/ins&gt;width:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;54em&lt;/ins&gt;&amp;quot; data-expandtext=&amp;quot;&amp;amp;#9660;&amp;quot; data-collapsetext=&amp;quot;&amp;amp;#9650;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|+ style=&amp;quot;background-color:#2e3871; color:white;text-align: center; width:10em&amp;quot;| &amp;lt;strong&amp;gt;Further remarks&amp;lt;/strong&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|+ style=&amp;quot;background-color:#2e3871; color:white;text-align: center; width:10em&amp;quot;| &amp;lt;strong&amp;gt;Further remarks&amp;lt;/strong&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|It is possible to display updated remote repository information without actually updating:{{Avoid wrap|&amp;lt;syntaxhighlight inline&amp;gt;git ls-remote origin&amp;lt;/syntaxhighlight&amp;gt;}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|It is possible to display updated remote repository information without actually updating:{{Avoid wrap|&amp;lt;syntaxhighlight inline&amp;gt;git ls-remote origin&amp;lt;/syntaxhighlight&amp;gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|If we have several remote repositories, we need to further specify the desired branch: &amp;lt;syntaxhighlight inline&amp;gt;git checkout -b &amp;lt;name of branch&amp;gt; &amp;lt;name of remote repository&amp;gt;/&amp;lt;name of remote branch&amp;gt; &amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|&amp;lt;syntaxhighlight inline&amp;gt;git fetch &amp;lt;name of remote branch&amp;gt;&amp;lt;/syntaxhighlight&amp;gt; can be used to only update information on one particular remote branch.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|-&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|If more than one remote repository is available, {{Avoid wrap|&amp;lt;syntaxhighlight inline&amp;gt;git remote update&amp;lt;/syntaxhighlight&amp;gt;}} will update information on all of them.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|-&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|If we have several remote repositories, we need to further specify the desired branch: &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;{{Avoid wrap|&lt;/ins&gt;&amp;lt;syntaxhighlight inline&amp;gt;git checkout -b &amp;lt;name of branch&amp;gt; &amp;lt;name of remote repository&amp;gt;/&amp;lt;name of remote branch&amp;gt; &amp;lt;/syntaxhighlight&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|&amp;lt;syntaxhighlight inline&amp;gt;git checkout&amp;lt;/syntaxhighlight&amp;gt; is actually more versatile and not only used for switching or restoring branches. Therefore, beginning with version 2.23, Git introduced {{Avoid wrap|&amp;lt;syntaxhighlight inline&amp;gt;git switch &amp;lt;name of existing branch&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;}} for switching to a different branch.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|&amp;lt;syntaxhighlight inline&amp;gt;git checkout&amp;lt;/syntaxhighlight&amp;gt; is actually more versatile and not only used for switching or restoring branches. Therefore, beginning with version 2.23, Git introduced {{Avoid wrap|&amp;lt;syntaxhighlight inline&amp;gt;git switch &amp;lt;name of existing branch&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;}} for switching to a different branch.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l128&quot; &gt;Line 128:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 136:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|&amp;lt;syntaxhighlight inline&amp;gt;git switch&amp;lt;/syntaxhighlight&amp;gt; is still marked as experimental in the Git documentation, which is why we only mention it here.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|&amp;lt;syntaxhighlight inline&amp;gt;git switch&amp;lt;/syntaxhighlight&amp;gt; is still marked as experimental in the Git documentation, which is why we only mention it here.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Best Practices ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Best Practices ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* Always start a new branch when working on a new feature and [[Git_Tutorials/Merging|merge]] your changes and additions into the main branch, once the work is finished.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* Common branches are: main, develop, feature, release, hotfix. Naturally, those branches can have branches as well, e.g., when multiple features are being developed at the same time. However, depending on your environment, completely different naming conventions can be sensible.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* Several strategies exist on the structured creation of branches and branching conventions. [[Git_Tutorials/CI/CD|We cover them here]].&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Glossary ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Glossary ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &amp;lt;syntaxhighlight inline&amp;gt;branch&amp;lt;/syntaxhighlight&amp;gt;: Used for creating new branches and displaying branch information.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* &amp;lt;syntaxhighlight inline&amp;gt;fetch&amp;lt;/syntaxhighlight&amp;gt;: Used to update information on remote repositories (and branches).&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Useful Links ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Useful Links ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* [https://lab.github.com/githubtraining/introduction-to-github Interactive GitHub course]: Introduction and basic branch operations&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* [https://www.researchgate.net/publication/359405202_Guidelines_for_collaborative_development_of_sustainable_data_treatment_software Paper on aspects of RSE]: Section 3.2.3 contains information on different branching workflows and where they are employed.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key hpc_wiki:diff::1.12:old-4934:rev-4937 --&gt;
&lt;/table&gt;</summary>
		<author><name>Kamil-braschke-0d3e@uni-wuppertal.de</name></author>
	</entry>
	<entry>
		<id>https://hpc-wiki.info/hpc/index.php?title=Git_Tutorials/Branching&amp;diff=4934&amp;oldid=prev</id>
		<title>Kamil-braschke-0d3e@uni-wuppertal.de: Created page with &quot;﻿Git Tutorials: Branching&lt;nowiki /&gt; {{DISPLAYTITLE:Git Tutorial: Branching}}&lt;nowiki /&gt; {{Syllabus Git Tutorials}}  Branching is an important feature o...&quot;</title>
		<link rel="alternate" type="text/html" href="https://hpc-wiki.info/hpc/index.php?title=Git_Tutorials/Branching&amp;diff=4934&amp;oldid=prev"/>
		<updated>2022-08-24T12:29:31Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;﻿&lt;a href=&quot;/hpc/Category:Tutorials&quot; title=&quot;Category:Tutorials&quot;&gt;Git Tutorials: Branching&lt;/a&gt;&amp;lt;nowiki /&amp;gt; {{DISPLAYTITLE:Git Tutorial: Branching}}&amp;lt;nowiki /&amp;gt; {{Syllabus Git Tutorials}}  Branching is an important feature o...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;﻿[[Category:Tutorials|Git Tutorials: Branching]]&amp;lt;nowiki /&amp;gt;&lt;br /&gt;
{{DISPLAYTITLE:Git Tutorial: Branching}}&amp;lt;nowiki /&amp;gt;&lt;br /&gt;
{{Syllabus Git Tutorials}}&lt;br /&gt;
&lt;br /&gt;
Branching is an important feature of Git, which enables simultaneous work on different parts of a code with minimal interference between acting parties. As the name implies, branching refers to the creation of a separate line of repository tracking that branches of from your &amp;quot;main&amp;quot; repository (also called a branch, but can be understood as the trunk). When developing new features you do not necessarily want to directly &amp;lt;syntaxhighlight inline&amp;gt;commit&amp;lt;/syntaxhighlight&amp;gt;  your changes to &amp;quot;main&amp;quot;, because they might interfere with your colleagues contribution of other features on a different branch. Even when differences do not directly interfere, they can still lead to a more cumbersome &amp;lt;syntaxhighlight inline&amp;gt;merge&amp;lt;/syntaxhighlight&amp;gt; of both branches into &amp;quot;main&amp;quot;, once all changes are complete. In larger projects this &amp;lt;syntaxhighlight inline&amp;gt;merge&amp;lt;/syntaxhighlight&amp;gt; &amp;#039;&amp;#039;ing&amp;#039;&amp;#039; into the &amp;quot;main&amp;quot; branch is often blocked for most users. A so-called &amp;lt;syntaxhighlight inline&amp;gt;pull&amp;lt;/syntaxhighlight&amp;gt; request must be made, so that a responsible person can &amp;lt;syntaxhighlight inline&amp;gt;pull&amp;lt;/syntaxhighlight&amp;gt; your changes from your branch into &amp;quot;main&amp;quot;.&lt;br /&gt;
To view all existing branches use the &amp;lt;syntaxhighlight inline&amp;gt;git branch --list&amp;lt;/syntaxhighlight&amp;gt; command:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line&amp;gt;&lt;br /&gt;
user@HPC.NRW:~$ git branch --list&lt;br /&gt;
* main&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that currently the project contains only one branch called &amp;quot;main&amp;quot; (line 2). The &amp;quot;*&amp;quot; next to it is used to mark our current branch.&lt;br /&gt;
&lt;br /&gt;
== Handling Branches == &lt;br /&gt;
&lt;br /&gt;
Creating a new branch is as easy as entering &amp;lt;syntaxhighlight inline&amp;gt;git branch &amp;lt;name of branch&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line&amp;gt;&lt;br /&gt;
user@HPC.NRW:~$ git branch branchingTut&lt;br /&gt;
user@HPC.NRW:~$ git branch --list&lt;br /&gt;
  branchingTut&lt;br /&gt;
* main&lt;br /&gt;
user@HPC.NRW:~$ git branch -a&lt;br /&gt;
  branchingTut&lt;br /&gt;
* main&lt;br /&gt;
  remotes/origin/main&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
In above example we can see that creating a new branch does not imply switching to it (the &amp;quot;*&amp;quot; is still next to &amp;quot;main&amp;quot;). Further, displaying all local and remote branches through &amp;lt;syntaxhighlight inline&amp;gt;git branch -a&amp;lt;/syntaxhighlight&amp;gt;, we see that the new branch does only exist locally and not in the remote repository unlike &amp;quot;main&amp;quot; (line 8). The new branch will be identical to the last &amp;lt;syntaxhighlight inline&amp;gt;commit&amp;lt;/syntaxhighlight&amp;gt; of the current branch, in our case &amp;quot;main&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
To switch to a different branch we use &amp;lt;syntaxhighlight inline&amp;gt;git checkout &amp;lt;name of branch&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line&amp;gt;&lt;br /&gt;
user@HPC.NRW:~$ git checkout branchingTut&lt;br /&gt;
M	someFile&lt;br /&gt;
Switched to branch &amp;#039;branchingTut&amp;#039;&lt;br /&gt;
user@HPC.NRW:~$ git branch -a&lt;br /&gt;
* branchingTut&lt;br /&gt;
  main&lt;br /&gt;
  remotes/origin/main&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Line 2 informs us about a &amp;lt;syntaxhighlight inline&amp;gt;M&amp;lt;/syntaxhighlight&amp;gt;odified file named &amp;quot;someFile&amp;quot;. This can happen if we make changes to our repository (like &amp;lt;syntaxhighlight inline&amp;gt;A&amp;lt;/syntaxhighlight&amp;gt;dding or &amp;lt;syntaxhighlight inline&amp;gt;M&amp;lt;/syntaxhighlight&amp;gt;odifying files), but do not &amp;lt;syntaxhighlight inline&amp;gt;commit&amp;lt;/syntaxhighlight&amp;gt; them before switching the branch. Naturally, this also happens when we want to switch to a branch with different contents than in hour current branch.&lt;br /&gt;
Keep in mind that a &amp;lt;syntaxhighlight inline&amp;gt;git checkout &amp;lt;name of branch&amp;gt;&amp;lt;/syntaxhighlight&amp;gt; is not like a &amp;lt;syntaxhighlight inline&amp;gt;git clone&amp;lt;/syntaxhighlight&amp;gt; operation and therefore does not make a full copy of a different code branch. Instead, it tracks the &amp;lt;syntaxhighlight inline&amp;gt;commit&amp;lt;/syntaxhighlight&amp;gt; history of the chosen branch and reproduces the changes in your repository. Any modifications you &amp;lt;syntaxhighlight inline&amp;gt;commit&amp;lt;/syntaxhighlight&amp;gt; now will be added to that branch.&lt;br /&gt;
&lt;br /&gt;
{| role=&amp;quot;presentation&amp;quot; class=&amp;quot;wikitable mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:62em&amp;quot; data-expandtext=&amp;quot;&amp;amp;#9660;&amp;quot; data-collapsetext=&amp;quot;&amp;amp;#9650;&amp;quot;&lt;br /&gt;
|+ style=&amp;quot;background-color:#2e3871; color:white;text-align: center; width:10em&amp;quot;| &amp;lt;strong&amp;gt;Further remarks&amp;lt;/strong&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|If we want to create a new branch and directly switch to it, we use {{Avoid wrap|&amp;lt;syntaxhighlight inline&amp;gt;git checkout -b &amp;lt;name of new branch&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;}}.&lt;br /&gt;
|-&lt;br /&gt;
| Usually, a branch is created from the most recent commit of the branch you are currently on. If we want to create it from a different branch (and switch to it), we will have to use {{Avoid wrap|&amp;lt;syntaxhighlight inline&amp;gt;git checkout -b ＜name of new branch＞ ＜name of different branch＞&amp;lt;/syntaxhighlight&amp;gt;}}.&lt;br /&gt;
|-&lt;br /&gt;
| To delete a branch we type {{Avoid wrap|&amp;lt;syntaxhighlight inline&amp;gt;git branch -d &amp;lt;name of branch&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;}}.&lt;br /&gt;
|-&lt;br /&gt;
| Renaming our current branch is done through the command {{Avoid wrap|&amp;lt;syntaxhighlight inline&amp;gt;git branch -m &amp;lt;new name of branch&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;}}.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Remote Branches ==&lt;br /&gt;
&lt;br /&gt;
If others are supposed to have access to our branch (or we want to have access from different locations), we need to make sure that it also exists in the remote repository by entering &amp;lt;syntaxhighlight inline&amp;gt;git push &amp;lt;name of remote repository&amp;gt; &amp;lt;name of branch&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line&amp;gt;&lt;br /&gt;
user@HPC.NRW:~$ git push origin branchingTut&lt;br /&gt;
Username for &amp;#039;https://github.com&amp;#039;: HPC.NRW-User&lt;br /&gt;
Password for &amp;#039;https://HPC.NRW-User@github.com&amp;#039;: ********&lt;br /&gt;
#Enumerating objects: 15, done.&lt;br /&gt;
Counting objects: 100% (15/15), done.&lt;br /&gt;
Delta compression using up to 12 threads&lt;br /&gt;
Compressing objects: 100% (13/13), done.&lt;br /&gt;
Writing objects: 100% (13/13), 42.00 KiB | 10.50 MiB/s, done.&lt;br /&gt;
Total 13 (delta 6), reused 0 (delta 0)&lt;br /&gt;
remote: Resolving deltas: 100% (6/6), completed with 1 local object.&lt;br /&gt;
remote: &lt;br /&gt;
remote: Create a pull request for &amp;#039;branchingTut&amp;#039; on GitHub by visiting:&lt;br /&gt;
remote:      https://github.com/HPC.NRW-User/Wikipages/pull/new/branchingTut&lt;br /&gt;
remote: &lt;br /&gt;
To https://github.com/HPC.NRW-User/Wikipages.git&lt;br /&gt;
 * [new branch]      branchingTut -&amp;gt; branchingTut&lt;br /&gt;
 &lt;br /&gt;
user@HPC.NRW:~$ git branch -a&lt;br /&gt;
* branchingTut&lt;br /&gt;
  main&lt;br /&gt;
  remotes/origin/branchingTut&lt;br /&gt;
  remotes/origin/main&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This is very similar to the [[Git_Tutorials/Creating_and_Changing_Repositories|previous]] &amp;lt;syntaxhighlight inline&amp;gt;push&amp;lt;/syntaxhighlight&amp;gt; operations with the only difference being that instead of the &amp;quot;main&amp;quot; branch in the remote repository, we will be using the &amp;quot;branchingTut&amp;quot; branch. As this branch did not exist yet, it will be created for us. In lines 18 to 22 we can see all existing branches including the newly created remote branch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A remote &amp;lt;syntaxhighlight inline&amp;gt;checkout&amp;lt;/syntaxhighlight&amp;gt; works the same way a local &amp;lt;syntaxhighlight inline&amp;gt;checkout&amp;lt;/syntaxhighlight&amp;gt; does. The main difference is that your local repository might not be up to date with remote branch information, which is why we might miss updates on existing branches (as well as respective &amp;lt;syntaxhighlight inline&amp;gt;git log&amp;lt;/syntaxhighlight&amp;gt; data). Below, you can see Git output for a user who cloned our repository after the first tutorial, but before branching was introduced:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line&amp;gt;&lt;br /&gt;
otherUser@HPC.NRW:~$ git branch -a&lt;br /&gt;
* main&lt;br /&gt;
  remotes/origin/HEAD -&amp;gt; origin/main&lt;br /&gt;
  remotes/origin/main&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to see the newest changes in the remote repository, they need to use the &amp;lt;syntaxhighlight inline&amp;gt;fetch&amp;lt;/syntaxhighlight&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; line&amp;gt;&lt;br /&gt;
otherUser@HPC.NRW:~$ git fetch&lt;br /&gt;
Username for &amp;#039;https://github.com&amp;#039;: HPC.NRW-otherUser&lt;br /&gt;
Password for &amp;#039;https://HPC.NRW-otherUser@github.com&amp;#039;: &lt;br /&gt;
remote: Enumerating objects: 15, done.&lt;br /&gt;
remote: Counting objects: 100% (15/15), done.&lt;br /&gt;
remote: Compressing objects: 100% (7/7), done.&lt;br /&gt;
remote: Total 13 (delta 6), reused 13 (delta 6), pack-reused 0&lt;br /&gt;
Unpacking objects: 100% (13/13), done.&lt;br /&gt;
From https://github.com/HPC.NRW-User/Wikipages&lt;br /&gt;
 * [new branch]      branchingTut -&amp;gt; origin/branchingTut&lt;br /&gt;
&lt;br /&gt;
otherUser@HPC.NRW:~$ git branch -a&lt;br /&gt;
* main&lt;br /&gt;
  remotes/origin/HEAD -&amp;gt; origin/main&lt;br /&gt;
  remotes/origin/branchingTut&lt;br /&gt;
  remotes/origin/main&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 10 informs them that a new branch exists in the remote repository. Lines 12 to 16 show that they can see the &amp;quot;branchingTut&amp;quot; branch, however, they still do not have a local version of it. Using &amp;lt;syntaxhighlight inline&amp;gt;git checkout &amp;lt;name of remote branch&amp;gt;&amp;lt;/syntaxhighlight&amp;gt; they can then create a local branch based on the remote one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| role=&amp;quot;presentation&amp;quot; class=&amp;quot;wikitable mw-collapsible mw-collapsed&amp;quot; style=&amp;quot;width:60em&amp;quot; data-expandtext=&amp;quot;&amp;amp;#9660;&amp;quot; data-collapsetext=&amp;quot;&amp;amp;#9650;&amp;quot;&lt;br /&gt;
|+ style=&amp;quot;background-color:#2e3871; color:white;text-align: center; width:10em&amp;quot;| &amp;lt;strong&amp;gt;Further remarks&amp;lt;/strong&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|It is possible to display updated remote repository information without actually updating:{{Avoid wrap|&amp;lt;syntaxhighlight inline&amp;gt;git ls-remote origin&amp;lt;/syntaxhighlight&amp;gt;}}&lt;br /&gt;
|-&lt;br /&gt;
|If we have several remote repositories, we need to further specify the desired branch: &amp;lt;syntaxhighlight inline&amp;gt;git checkout -b &amp;lt;name of branch&amp;gt; &amp;lt;name of remote repository&amp;gt;/&amp;lt;name of remote branch&amp;gt; &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight inline&amp;gt;git checkout&amp;lt;/syntaxhighlight&amp;gt; is actually more versatile and not only used for switching or restoring branches. Therefore, beginning with version 2.23, Git introduced {{Avoid wrap|&amp;lt;syntaxhighlight inline&amp;gt;git switch &amp;lt;name of existing branch&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;}} for switching to a different branch.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight inline&amp;gt;git switch -c &amp;lt;name of new branch&amp;gt;&amp;lt;/syntaxhighlight&amp;gt; creates a new branch and switches to it.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;syntaxhighlight inline&amp;gt;git switch&amp;lt;/syntaxhighlight&amp;gt; is still marked as experimental in the Git documentation, which is why we only mention it here.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Best Practices ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Useful Links ==&lt;/div&gt;</summary>
		<author><name>Kamil-braschke-0d3e@uni-wuppertal.de</name></author>
	</entry>
</feed>