<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Git SCM on BWRGY</title><link>https://handbook-bwrgy-org-971173.gitlab.io/handbook/development/git/</link><description>Recent content in Git SCM on BWRGY</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://handbook-bwrgy-org-971173.gitlab.io/handbook/development/git/index.xml" rel="self" type="application/rss+xml"/><item><title>Initial Setup</title><link>https://handbook-bwrgy-org-971173.gitlab.io/handbook/development/git/setup/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://handbook-bwrgy-org-971173.gitlab.io/handbook/development/git/setup/</guid><description>&lt;h2 id="install-git"&gt;Install Git&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Linux&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# For CentOS/RHEL&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo yum install git
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;or&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# For Debian/Ubuntu&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo apt install git
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;macOS (Homebrew)&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;brew install git
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Windows&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Download Git from the official website:&lt;br&gt;
&lt;code&gt;https://git-scm.com/downloads&lt;/code&gt; or click here: &lt;a href="https://git-scm.com/downloads"&gt;Git&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Verify Installation&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git --version
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="vs-code-setup-for-gitlab"&gt;VS Code Setup for Gitlab&lt;/h2&gt;
&lt;p&gt;Git integration is built into VS Code.&lt;/p&gt;
&lt;h3 id="install-gitlab-extension"&gt;Install GitLab Extension&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Go to &lt;strong&gt;Extensions&lt;/strong&gt; (&lt;code&gt;Ctrl+Shift+X&lt;/code&gt; / &lt;code&gt;Cmd+Shift+X&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Search for &lt;strong&gt;GitLab Workflow&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Install&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="set-git-user"&gt;Set Git User&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git init
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git config --global user.name &lt;span style="color:#e6db74"&gt;&amp;#34;Your Name&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git config --global user.email &lt;span style="color:#e6db74"&gt;&amp;#34;your_email@example.com&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="ssh-authentication-setup"&gt;SSH Authentication Setup&lt;/h2&gt;
&lt;h3 id="1-generate-ssh-key"&gt;1. Generate SSH Key&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ssh-keygen -t ed25519 -C &lt;span style="color:#e6db74"&gt;&amp;#34;your_email@example.com&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;Replace with your GitLab email address.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="2-save-ssh_key"&gt;2. Save SSH_KEY&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;When prompted to &amp;ldquo;Enter a file in which to save the key,&amp;rdquo; press Enter. This will save the key to the default location or specify a custom one.&lt;/p&gt;</description></item><item><title>Workflow Guide</title><link>https://handbook-bwrgy-org-971173.gitlab.io/handbook/development/git/workflow/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://handbook-bwrgy-org-971173.gitlab.io/handbook/development/git/workflow/</guid><description>&lt;h2 id="visual-representation"&gt;Visual Representation&lt;/h2&gt;
&lt;p&gt;Here is a simple visual representation of the Git workflow:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;git add&lt;/code&gt; &amp;ndash;&amp;gt; &lt;code&gt;git commit&lt;/code&gt; &amp;ndash;&amp;gt; &lt;code&gt;git push&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id="1-working-directory"&gt;1. Working Directory&lt;/h3&gt;
&lt;p&gt;The working directory is where you create and modify your files. This is the starting point of the Git workflow.&lt;/p&gt;
&lt;h3 id="2-staging-area"&gt;2. Staging Area&lt;/h3&gt;
&lt;p&gt;The staging area is where you prepare your files for the next commit. You can think of it as a temporary holding area for your files before they are committed to the local repository.&lt;/p&gt;</description></item><item><title>Merge and Rebase</title><link>https://handbook-bwrgy-org-971173.gitlab.io/handbook/development/git/merge-rebase/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://handbook-bwrgy-org-971173.gitlab.io/handbook/development/git/merge-rebase/</guid><description>&lt;h2 id="core-strategy"&gt;Core Strategy&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Rebase:&lt;/strong&gt; Use when bringing changes from main into your feature branch&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Merge:&lt;/strong&gt; Use when integrating your feature branch into main (via MR/PR)&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Aspect&lt;/th&gt;
 &lt;th&gt;Rebase&lt;/th&gt;
 &lt;th&gt;Merge&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;History&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Linear, clean&lt;/td&gt;
 &lt;td&gt;Preserves branching context&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Command&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;git rebase origin/main&lt;/code&gt;&lt;/td&gt;
 &lt;td&gt;&lt;code&gt;git merge feature-branch&lt;/code&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Conflicts&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Resolve per commit&lt;/td&gt;
 &lt;td&gt;Resolve once&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Force Push&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Required after rebase&lt;/td&gt;
 &lt;td&gt;Not needed&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Team Impact&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Changes commit hashes&lt;/td&gt;
 &lt;td&gt;Safe for shared branches&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;strong&gt;Best For&lt;/strong&gt;&lt;/td&gt;
 &lt;td&gt;Keeping feature current&lt;/td&gt;
 &lt;td&gt;Final integration&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="example-scenario"&gt;Example Scenario&lt;/h2&gt;
&lt;h3 id="initial-state"&gt;Initial State&lt;/h3&gt;
&lt;p&gt;You create a feature branch from commit F, then make several commits while main continues to evolve:&lt;/p&gt;</description></item><item><title>Git Commands</title><link>https://handbook-bwrgy-org-971173.gitlab.io/handbook/development/git/commands/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://handbook-bwrgy-org-971173.gitlab.io/handbook/development/git/commands/</guid><description>&lt;h2 id="1-getting-started"&gt;1. Getting Started&lt;/h2&gt;
&lt;h3 id="git-init"&gt;Git init&lt;/h3&gt;
&lt;p&gt;This command is used to initialize a new git repository or to add an existing repository to a new directory. Transform the current directory into a Git repository. This adds a .git subdirectory to the current directory and makes it possible to start recording revisions of the project.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# It creates a new .git subdirectory in the current working directory&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git init 
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="git-config"&gt;Git config&lt;/h3&gt;
&lt;p&gt;A convenient way to set configuration options for your Git installation. You’ll typically only need to use this immediately after installing Git on a new development machine.&lt;/p&gt;</description></item></channel></rss>