<?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: Vic-rider</title>
    <description>The latest articles on Forem by Vic-rider (@vicrider).</description>
    <link>https://forem.com/vicrider</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%2F729144%2Fbff15ff4-4666-4cd7-b4c2-a6b341923d64.jpeg</url>
      <title>Forem: Vic-rider</title>
      <link>https://forem.com/vicrider</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/vicrider"/>
    <language>en</language>
    <item>
      <title>How to show less content in Angular</title>
      <dc:creator>Vic-rider</dc:creator>
      <pubDate>Sat, 15 Jul 2023 07:11:54 +0000</pubDate>
      <link>https://forem.com/vicrider/how-to-show-less-content-in-angular-547j</link>
      <guid>https://forem.com/vicrider/how-to-show-less-content-in-angular-547j</guid>
      <description>&lt;h4&gt;
  
  
  Made by &lt;a href="https://twitter.com/tossouvincenta1"&gt;@Vic-rider&lt;/a&gt;
&lt;/h4&gt;

&lt;h2&gt;
  
  
  NgxLessTextPipe
&lt;/h2&gt;

&lt;p&gt;This pipe is created to help show less content like emails, descriptions, details.&lt;/p&gt;

&lt;h3&gt;
  
  
  Install
&lt;/h3&gt;

&lt;p&gt;Run &lt;code&gt;npm i ngx-less-text-pipe&lt;/code&gt; to install it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Import
&lt;/h3&gt;

&lt;p&gt;Navigate to the module or standalone component in which you want to use.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;NgxLessTextModule&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ngx-less-text-pipe&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="nd"&gt;NgModule&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;declarations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;imports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nx"&gt;BrowserModule&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;NgxLessTextModule&lt;/span&gt;
  &lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="na"&gt;providers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;ProductsModule&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Use
&lt;/h3&gt;

&lt;p&gt;You have to go to your template where you want to use lessText pipe.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt; {{ product.description | lessText:'100' }} &lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, 100 represents the number of characters you want to display.&lt;/p&gt;

</description>
      <category>angular</category>
      <category>pip</category>
      <category>lesscontent</category>
      <category>text</category>
    </item>
    <item>
      <title>How to know which languages are spoken in a country as official or native.</title>
      <dc:creator>Vic-rider</dc:creator>
      <pubDate>Sat, 15 Jul 2023 06:07:34 +0000</pubDate>
      <link>https://forem.com/vicrider/how-to-know-which-languages-are-spoken-in-a-country-as-official-or-native-3i6g</link>
      <guid>https://forem.com/vicrider/how-to-know-which-languages-are-spoken-in-a-country-as-official-or-native-3i6g</guid>
      <description>&lt;h4&gt;
  
  
  Made by &lt;a href="https://twitter.com/tossouvincenta1"&gt;@Vic-rider&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;countries-speaking-languages&lt;/strong&gt;, query country information to know if a language is speaking in this country as &lt;strong&gt;&lt;code&gt;official language&lt;/code&gt;&lt;/strong&gt; or a &lt;strong&gt;&lt;code&gt;native language&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;

&lt;p&gt;Install using &lt;code&gt;npm install countries-speaking-languages&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;

&lt;p&gt;To include Countries-speaking-languages, require or import it:&lt;/p&gt;

&lt;p&gt;in JavaScript&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;CountriesSpeakingLanguage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;countries-speaking-languages&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;in TypeScript&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;CountriesSpeakingLanguage&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;countries-speaking-languages&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Create an instance of it
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;countriesSpeakingLanguages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;CountriesSpeakingLanguage&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can get country information.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ex&lt;/strong&gt; :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;countriesSpeakingLanguages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getCountry&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;country_code&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// returns country_datas [object]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can get country officials languages data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ex&lt;/strong&gt; :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;countriesSpeakingLanguages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getCountryOfficialsLanguages&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;BJ&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// "BJ" as `country_code`&lt;/span&gt;
&lt;span class="c1"&gt;// returns { 'languages' : ['French'], 'languages_codes': ['fr'] }&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can get country spoken languages data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ex&lt;/strong&gt; :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;countriesSpeakingLanguages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getCountryAllSpeakingLanguages&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;BJ&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// "BJ" as `country_code`&lt;/span&gt;
&lt;span class="c1"&gt;// returns [ { "language": "French", "code": "fr" }, { "language": "Yoruba", "code": "yo" }, { "language": "Fon", "code": "fon" } ]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check if a specific language is spoken as official language in a specific country&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ex&lt;/strong&gt; :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;countriesSpeakingLanguages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;hasLanguageAsOfficial&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;fr&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;JP&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// "JP" as `country_code` and 'fr' as `language_code`&lt;/span&gt;
&lt;span class="c1"&gt;// returns false    : french is not an official language of Japan&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check if a specific language is spoken in a specific country&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ex&lt;/strong&gt; :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;countriesSpeakingLanguages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;hasLanguage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;pt&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;AO&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// "AO" as `country_code` and 'pt' as `language_code`&lt;/span&gt;
&lt;span class="c1"&gt;// returns true  : portuguese is spoken in Angola&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You also have others ways to check if some languages are spoken in a specific country as official languages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ex&lt;/strong&gt; :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;countriesSpeakingLanguages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;hasEnglishAsOfficialLanguage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;AO&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// "AO" as `country_code` `&lt;/span&gt;
&lt;span class="c1"&gt;// returns false  : english is not spoken in Angola as official language&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here is other Official languages checker you can use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;hasMadarinAsOfficialLanguage(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasHindiAsOfficialLanguage(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasSpanishAsOfficialLanguage(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasFrenchAsOfficialLanguage(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasArabicAsOfficialLanguage(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasBengaliAsOfficialLanguage(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasRussianAsOfficialLanguage(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasPortugueseAsOfficialLanguage(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasIndonesianAsOfficialLanguage(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasUrduOfficiaAslLanguage(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasJapaneseAsOfficialLanguage(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasGermanAsOfficialLanguage(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasChineseAsOfficialLanguage(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasTurkishAsOfficialLanguage(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasKoreanAsOfficialLanguage(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasYorubaAsOfficialLanguage(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasFonAsOfficialLanguage(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here is the ways to check if some languages are spoken in a specific country.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ex&lt;/strong&gt; :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;countriesSpeakingLanguages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;hasEnglishAsSpeakingLanguages&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;GH&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// "GH" as `country_code` `&lt;/span&gt;
&lt;span class="c1"&gt;// returns true  : english is spoken in Ghana&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here is other languages checker you can use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;hasMadarinAsSpeakingLanguages(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasHindiAsSpeakingLanguages(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasSpanishAsSpeakingLanguages(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasFrenchAsSpeakingLanguages(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasArabicAsSpeakingLanguages(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasBengaliAsSpeakingLanguages(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasRussianAsSpeakingLanguages(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasPortugueseAsSpeakingLanguages(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasIndonesianAsSpeakingLanguages(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasUrduSpeakingLanguage(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasJapaneseAsSpeakingLanguages(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasGermanAsSpeakingLanguages(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasJavaneseAsSpeakingLanguages(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasChineseAsSpeakingLanguages(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasTurkishAsSpeakingLanguages(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasKoreanAsSpeakingLanguages(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasYorubaAsSpeakingLanguages(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;hasFonAsSpeakingLanguages(country_code)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Test
&lt;/h2&gt;

&lt;p&gt;To test countries-speaking-languages, run &lt;code&gt;npm test&lt;/code&gt;&lt;/p&gt;

</description>
      <category>country</category>
      <category>countries</category>
      <category>languages</category>
      <category>native</category>
    </item>
    <item>
      <title>My .gitignore doesn't work, git not ignoring my files/folders. How to fix it ? How to ignore committed files/folders ?</title>
      <dc:creator>Vic-rider</dc:creator>
      <pubDate>Sun, 26 Mar 2023 17:49:36 +0000</pubDate>
      <link>https://forem.com/vicrider/my-gitignore-doesnt-work-git-not-ignoring-my-filesfolders-how-to-fix-it-how-to-ignore-committed-filesfolders--n45</link>
      <guid>https://forem.com/vicrider/my-gitignore-doesnt-work-git-not-ignoring-my-filesfolders-how-to-fix-it-how-to-ignore-committed-filesfolders--n45</guid>
      <description>&lt;p&gt;One thing you have to know is that Git only ignores the files/folders that have not been committed to the repository yet and are listed in .gitignore. So before your first commit, remember to set the files/folders you want to ignore to .gitignore and with their right path.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Cause&lt;/em&gt;&lt;/strong&gt; : &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When you don’t put the right path of your files in .gitignore list&lt;/li&gt;
&lt;li&gt;When you don’t set your .gitignore list before your first commit. Git don’t ignore the files that are already committed. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Solution&lt;/em&gt;&lt;/strong&gt; : &lt;/p&gt;

&lt;p&gt;The solution is quite simple. You have to push again without the file or folder you wanted to exclude existing in your workspace.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;A&lt;/em&gt;. &lt;strong&gt;Remove or Backup Files/Folders&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You have to remove all the files/folders that are supposed to be ignored by git and make a commit. But to make things easy, you can back them up to replace them in their right path when the fixing is done. &lt;/p&gt;

&lt;p&gt;It will make the files/folders untracked by git. After that, make sure they are properly listed in .gitignore with the right path, and they should no longer be tracked by git.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;B&lt;/em&gt;. &lt;strong&gt;Fixing&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Method 01 :&lt;/strong&gt; More suitable when don’t have many important commits in your repository.&lt;/p&gt;

&lt;p&gt;You have to reset to the previous commit.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Run in your project &lt;code&gt;git log&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.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%2F5fe4a8904x2em0k3uqen.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F5fe4a8904x2em0k3uqen.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Run &lt;code&gt;git reset 59c46944f9bef24453a9d9a4cba18eba8c2ed6ba&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add the files/folders you remove or backup.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now you can re-add / re-stage your files with &lt;code&gt;git add -A&lt;/code&gt; or &lt;code&gt;git add *&lt;/code&gt;  and you can check if your files/folders are now ignored by git with &lt;code&gt;git status&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After that, you can make a commit with your issue fixed and git ignoring your files/folders. Run &lt;code&gt;git commit -m “commit with the files/folders ignored properly”&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Method 02 :&lt;/strong&gt; &lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Remove the files from the index (not the actual files in your project) &lt;code&gt;git rm -r –cached .&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add the files/folders you remove or backup.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now you can re-add / re-stage your files with &lt;code&gt;git add -A&lt;/code&gt; or &lt;code&gt;git add *&lt;/code&gt;  and you can check if your files/folders are now ignored by git with &lt;code&gt;git status&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After that, you can make a commit with your issue fixed and git ignoring your files/folders. Run &lt;code&gt;git commit -m “commit with the files/folders ignored properly”&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here is your humble servant Vincent TOSSOU (Vic-rider). I hope this article will help you solve your problem. And if you have any contributions to the content of this article, let me know in the comments.&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;

</description>
      <category>git</category>
      <category>gitignore</category>
    </item>
  </channel>
</rss>
