<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: JayRam Nai</title>
    <description>The latest articles on Forem by JayRam Nai (@jramnai).</description>
    <link>https://forem.com/jramnai</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F126848%2Fdf2ac167-01f9-4c88-b004-9443340e18cf.jpeg</url>
      <title>Forem: JayRam Nai</title>
      <link>https://forem.com/jramnai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/jramnai"/>
    <language>en</language>
    <item>
      <title>How to Sync Your Forked GitHub Repository with the Upstream Repo (Beginner Guide)</title>
      <dc:creator>JayRam Nai</dc:creator>
      <pubDate>Wed, 20 Aug 2025 06:43:53 +0000</pubDate>
      <link>https://forem.com/jramnai/how-to-sync-your-forked-github-repository-with-the-upstream-repo-beginner-guide-14l3</link>
      <guid>https://forem.com/jramnai/how-to-sync-your-forked-github-repository-with-the-upstream-repo-beginner-guide-14l3</guid>
      <description>&lt;p&gt;Recently, I forked an open-source repository on GitHub with the intention of contributing to the project. After forking, I had to step away from the fix I'd identified and returned to it several days later.&lt;/p&gt;

&lt;p&gt;Upon resuming work, I noticed a message stating "&lt;strong&gt;This branch is 11 commits behind.&lt;/strong&gt;" If you've contributed to open-source projects before, you've likely encountered this situation.&lt;/p&gt;

&lt;p&gt;In this guide, I'll explain what this message means and demonstrate how to properly sync your forked repository with the upstream repo to ensure you're working with the latest code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7v467229zt0xph7dxz9l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7v467229zt0xph7dxz9l.png" alt="Fork not in sync message" width="800" height="54"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What Does “11 Commit Behind” Mean?
&lt;/h2&gt;

&lt;p&gt;When you fork a repository, you make a personal copy of it under your GitHub account. However, the original repository (called the &lt;strong&gt;upstream repo&lt;/strong&gt;) keeps moving forward as other people contribute. When your fork doesn’t have the latest changes, GitHub shows that it’s “X commits behind”.&lt;/p&gt;

&lt;p&gt;Keeping your fork updated is important before submitting pull requests so that your work is based on the latest version of the codebase.&lt;/p&gt;




&lt;h2&gt;
  
  
  How to Sync Your Fork Using Git (Command Line)
&lt;/h2&gt;

&lt;p&gt;Here’s how to do it step-by-step:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. &lt;strong&gt;Add the upstream remote&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Open your terminal and navigate to your local clone of the forked repo.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git remote add upstream https://github.com/ORIGINAL_OWNER/REPO_NAME.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This tells Git where the original project lives.&lt;/p&gt;

&lt;p&gt;You can verify the remotes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git remote &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  2. &lt;strong&gt;Fetch the upstream changes&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git fetch upstream
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This downloads the latest changes from the upstream repo, but doesn’t merge them yet.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. &lt;strong&gt;Merge upstream into your local branch&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If your default branch is &lt;code&gt;main&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git checkout main
git merge upstream/main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If it’s &lt;code&gt;master&lt;/code&gt;, just replace &lt;code&gt;main&lt;/code&gt; with &lt;code&gt;master&lt;/code&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  4. &lt;strong&gt;Push the updated branch to your fork on GitHub&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now your GitHub fork is fully synced!&lt;/p&gt;




&lt;h2&gt;
  
  
  Prefer the GitHub Web Interface?
&lt;/h2&gt;

&lt;p&gt;If you're not comfortable with the command line yet, GitHub has a handy “&lt;strong&gt;Sync fork&lt;/strong&gt;” button.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Go to your forked repository on GitHub.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Look for a message like &lt;em&gt;“This branch is X commits behind...”&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click &lt;strong&gt;Sync fork&lt;/strong&gt; → &lt;strong&gt;Update branch&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Done!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsows8mk4qagmscen4qjd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsows8mk4qagmscen4qjd.png" alt="Sync fork from GitHub UI" width="800" height="215"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  A Few Tips for Beginners
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Always &lt;strong&gt;sync your fork&lt;/strong&gt; before starting new work or opening a pull request.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use a &lt;strong&gt;separate branch&lt;/strong&gt; for each new feature or bugfix.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Don’t be afraid to ask questions; open-source communities are often very welcoming!&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🎉 You’re Ready to Contribute!
&lt;/h2&gt;

&lt;p&gt;Keeping your fork in sync is a key part of the open-source workflow. Now that you’ve got this down, you're one step closer to becoming a confident open-source contributor.&lt;/p&gt;

&lt;p&gt;Got stuck? Drop a comment or reach out to the project maintainers; they'll usually be happy to help!&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Happy coding, and welcome to open source! 💻🌍&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;This blog was originally posted here: &lt;a href="https://jramnai.hashnode.dev/how-to-sync-your-forked-github-repository-with-the-upstream-repo-beginner-guide" rel="noopener noreferrer"&gt;https://jramnai.hashnode.dev/how-to-sync-your-forked-github-repository-with-the-upstream-repo-beginner-guide&lt;/a&gt;&lt;/p&gt;

</description>
      <category>github</category>
      <category>opensource</category>
      <category>developerguide</category>
      <category>contribution</category>
    </item>
    <item>
      <title>Enable Course Sidebar in open edX</title>
      <dc:creator>JayRam Nai</dc:creator>
      <pubDate>Sun, 06 Sep 2020 15:55:13 +0000</pubDate>
      <link>https://forem.com/jramnai/enable-cours-sidebar-in-open-edx-344c</link>
      <guid>https://forem.com/jramnai/enable-cours-sidebar-in-open-edx-344c</guid>
      <description>&lt;p&gt;Till the Ficus version of the open edX, there was no dedicated page for the course outline (which is now in the later releases), instead of it we were having course outline on the left side of the courseware page.&lt;/p&gt;

&lt;p&gt;This course outline on the left side was pretty much handy as the user do not have to open a separate page to hop on to any particular section/subsection/unit.&lt;/p&gt;

&lt;p&gt;This left-side course outline has not been removed from the source code. So, it is there on your platform - it is a good thing, isn't it?&lt;/p&gt;

&lt;p&gt;Now, one will question that if the source code is still there and in working condition then &lt;strong&gt;How can I get it back?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;open edX has made it very simple to get it back, for that you need to do the following thing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;open your LMS admin panel and search for the &lt;code&gt;flag&lt;/code&gt; table under the &lt;code&gt;waffle&lt;/code&gt; app and add the entry like this:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kTskK-WP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/umr545kpw1ytndjccr2u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kTskK-WP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/umr545kpw1ytndjccr2u.png" alt="Change_flag_LMS_Administration"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, open your courseware page and the course outline on the left side is back in action!&lt;/p&gt;

&lt;p&gt;Reference: &lt;a href="https://discuss.openedx.org/t/the-navigation-pane-on-left/1266/2"&gt;https://discuss.openedx.org/t/the-navigation-pane-on-left/1266/2&lt;/a&gt;&lt;/p&gt;

</description>
      <category>openedx</category>
      <category>python</category>
      <category>django</category>
    </item>
    <item>
      <title>How to check the value of your settings in open edX?</title>
      <dc:creator>JayRam Nai</dc:creator>
      <pubDate>Fri, 29 May 2020 14:00:00 +0000</pubDate>
      <link>https://forem.com/jramnai/how-to-check-the-value-of-your-settings-in-open-edx-4ap2</link>
      <guid>https://forem.com/jramnai/how-to-check-the-value-of-your-settings-in-open-edx-4ap2</guid>
      <description>&lt;p&gt;I am writing this post 'cause nowadays many of the devs are changing their settings in json / common.py / yml but the settings are not getting reflected on their open edX platform. So, in this post, I will not guide you about how to enable a particular setting but here I will be sharing the trick that How to check which settings are being used by the platform.&lt;/p&gt;

&lt;p&gt;We will understand this by one example.&lt;/p&gt;

&lt;p&gt;Suppose you want to enable/disable &lt;code&gt;ALLOW_PUBLIC_ACCOUNT_CREATION&lt;/code&gt; Feature flag in your platform. By default, this Feature flag is set to true so that user can create account on your open edX platform. We will set this to false cause we don't want anybody to create an account in the platform (Client's wish).&lt;/p&gt;

&lt;p&gt;So, to disable account creation we will set this flag to false in one of the setting file.&lt;/p&gt;

&lt;p&gt;Now we will restart the LMS service to reflect the changes from the settings. But what we see on the platform, users are still able to register themselves on the platform.&lt;/p&gt;

&lt;p&gt;It means that our changed value for the Feature flag is not being reflected on the platform (But we have set it to false already! Then why is this happening?).&lt;/p&gt;

&lt;p&gt;Now, this is the time to check that which value is being used by the platform for the &lt;code&gt;ALLOW_PUBLIC_ACCOUNT_CREATION&lt;/code&gt; feature flag. To check the value follow below steps:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python manage.py lms shell --settings &amp;lt;your settings&amp;gt;
from django.conf import settings
settings.FEATURES.get('ALLOW_PUBLIC_ACCOUNT_CREATION')
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;What we are doing here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;first we will open lms shell (just like Django shell)&lt;/li&gt;
&lt;li&gt;import settings as we want to check the settings&lt;/li&gt;
&lt;li&gt;get value for &lt;code&gt;ALLOW_PUBLIC_ACCOUNT_CREATION&lt;/code&gt; feature flag&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here you will get the value of the &lt;code&gt;ALLOW_PUBLIC_ACCOUNT_CREATION&lt;/code&gt; feature flag which is used by the platform. If it is still true then you have changed the wrong settings file, try to change it in another setting file. Change it until you get your changes in the shell. Once you see your changes in the shell then the feature or flag you have enabled or disabled will work properly.&lt;/p&gt;

&lt;p&gt;I have checked here for the &lt;code&gt;ALLOW_PUBLIC_ACCOUNT_CREATION&lt;/code&gt; feature flag only but you can check any of the settings like this.&lt;/p&gt;

&lt;p&gt;I hope this will help!&lt;/p&gt;

</description>
      <category>openedx</category>
      <category>python</category>
      <category>django</category>
    </item>
  </channel>
</rss>
