<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ludivine Achouri on Medium]]></title>
        <description><![CDATA[Stories by Ludivine Achouri on Medium]]></description>
        <link>https://medium.com/@la.dev?source=rss-e1291401bbea------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*uaTMOM_gjjQvd9-9uaZgxQ.jpeg</url>
            <title>Stories by Ludivine Achouri on Medium</title>
            <link>https://medium.com/@la.dev?source=rss-e1291401bbea------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 08:29:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@la.dev/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Git commands you must know]]></title>
            <link>https://towardsdev.com/git-commands-you-must-know-d217bf710502?source=rss-e1291401bbea------2</link>
            <guid isPermaLink="false">https://medium.com/p/d217bf710502</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[beginner]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Ludivine Achouri]]></dc:creator>
            <pubDate>Tue, 21 Dec 2021 17:02:50 GMT</pubDate>
            <atom:updated>2023-04-03T18:09:21.186Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RpdCB8ssHVk6dpHL31rKbA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@yancymin?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Yancy Min</a> on <a href="https://unsplash.com/">Unsplash</a></figcaption></figure><p>Git is a very important tool for any developer. I had a hard time understanding it at first, and I’m sure some of you are still a bit lost.</p><p>So here is a rundown of 13 important git commands to better manage your workflow. There are many more commands available that you can find <a href="https://git-scm.com/docs">here</a>, but these are the most useful and frequently used ones and they will definitely speed up your coding process.</p><p>If you are not sure to understand what Git is, or if maybe you don’t know the difference between Git and Github, I have an article explaining everything available <a href="https://medium.com/p/cba1ce44e7d7/">here</a>.</p><h3>1. git clone</h3><p>If you want to clone a remote repository use : <strong><em>git clone &lt;repository url&gt;</em></strong></p><h3>2. git init</h3><p>To start a new project in an empty repository or to initialize an existing project, use this command in the project root : <strong><em>git init</em></strong></p><h3>3. git fetch</h3><p>With <strong>git fetch</strong> you will get the latest updates of the repository, changes in the code and the new branches that were created.</p><h3>4. git checkout</h3><p>With this command, you can switch branches : <strong><em>git checkout</em></strong><em> </em><strong><em>&lt;branch name&gt;</em></strong></p><p>To create a new branch and switch to it : <strong><em>git checkout -b</em></strong><em> </em><strong><em>&lt;branch name&gt;</em></strong></p><h3>5. git add</h3><p>This command selects the files you updated, and that you wish to send to the remote repository.</p><p>You can add a specific file with <strong><em>git add</em></strong><em> &lt;</em><strong><em>file path&gt; </em></strong>or add all the files with <strong><em>git add -A </em></strong><em>or </em><strong><em>.</em></strong></p><h3>6. git stash</h3><p>If there are files that you don’t wish to commit now, you can set them aside or “stash” them.</p><p>You first need to add them with the previous command, and then use <strong><em>git stash</em></strong><em>.</em></p><p>To revert those changes, use <strong><em>git stash apply</em></strong> .</p><h3>7. git commit</h3><p>Once you made some changes in the code and you saved it, you have to <strong>commit</strong> them. You are creating a little “container” of updates that you describe with a message :</p><p><strong><em>git commit -m</em></strong><em> </em><strong><em>“commit message”</em></strong></p><p>Example : <strong><em>git commit -m</em></strong><em> </em><strong><em>“added a new react component”</em></strong></p><h3>8. git push</h3><p>This command will send your commits to the remote branch : <strong><em>git push</em></strong></p><h3>9. git revert</h3><p>You can revert commits you created. In order to do that, you will need to know the hash code of the commit. To get that hash code, use the command <strong><em>git log — oneline</em>.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/369/1*GGQWcvliqYnXTwCxVlFPEg.png" /></figure><p>This will display a list of commits you previously created alongside a little code, that’s what you are looking for.</p><p>If I wanted to revert that first commit, I will use the command <strong><em>git revert 7804f7c.</em></strong></p><p>Exit the screen that will appear with <strong>shift + q </strong>or type <strong>:qa </strong>in the terminal. A new commit will created reverting the last changes without deleting the previous commit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/353/1*CfpaSSh6U_F7AtMESc1QCw.png" /></figure><h3>10. git pull</h3><p>Using <strong><em>git pull</em></strong> will fetch all the changes from the remote repository and merge any remote changes in the current local branch.</p><h3>11. git branch</h3><p><strong><em>git branch</em></strong> gives you the list of all the branches of the repository.</p><p>You can also create new branches like this :</p><p><strong><em>git branch &lt;new branch name&gt;</em></strong></p><p>You can delete a branch as well :</p><p><strong><em>git branch -d &lt;branch name&gt;</em></strong></p><h3>12. git status</h3><p>The <strong><em>git status</em></strong> command gives you information about the current branch.</p><p>You will know if the current branch is up to date, if you need to <strong>push</strong>, or <strong>pull,</strong> if content is <strong>staged, unstaged</strong> or <strong>untracked</strong> and if files were <strong>created, modified</strong> or <strong>deleted.</strong></p><h3>13. git merge</h3><p><strong>Git merge</strong> is the command that “merges” or combine branches commits. Once you are done working on your branch, the last thing to do is to merge your branch with the main branch.</p><p>First you need to be on the branch you want your branch to be merged into.</p><p><strong>Example </strong>: If you want to merge your branch <strong><em>“my-new-feature”</em></strong> into the branch called ”<strong>main</strong>”, you need to checkout into <strong><em>“main”</em></strong> and run the command here.</p><p>If you don’t remember how to switch branches, type :</p><p><strong><em>git checkout main</em></strong></p><p>Before merging branches you should <strong><em>always</em></strong> fetch the latest updates:</p><p><strong><em>git fetch</em></strong></p><p>Now, you can merge you branch into the main branch :</p><p><strong><em>git merge my-new-feature</em></strong></p><p>Knowing these commands is very important, but I also advise you to use a software to manage git. <a href="https://desktop.github.com/">Github Desktop</a> is available for free to handle your GitHub repositories. You can find other alternatives like <a href="https://www.gitkraken.com/">GitKraken</a>.</p><p>I hope my article helped you understand all of this a little bit more ! Please don’t hesitate to ask questions if you need !</p><p><em>Originally posted on my </em><a href="https://blog.ludivineachouri.com/"><em>blog</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d217bf710502" width="1" height="1" alt=""><hr><p><a href="https://towardsdev.com/git-commands-you-must-know-d217bf710502">Git commands you must know</a> was originally published in <a href="https://towardsdev.com/">Towards Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Convert XLSX to JSON]]></title>
            <link>https://javascript.plainenglish.io/how-to-convert-xlsx-to-json-4439cc3d6a81?source=rss-e1291401bbea------2</link>
            <guid isPermaLink="false">https://medium.com/p/4439cc3d6a81</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Ludivine Achouri]]></dc:creator>
            <pubDate>Thu, 16 Dec 2021 17:02:39 GMT</pubDate>
            <atom:updated>2021-12-20T04:10:27.405Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DQ5y83TjF804miVd7hSGxA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@mbaumi?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Mika Baumeister</a> on <a href="https://unsplash.com/">Unsplash</a></figcaption></figure><h4>Do you need to get data from a spreadsheet and turn it into JSON? That’s not 🚀 science and I’m gonna prove it!</h4><p>First, install the <strong>xlsx</strong> package.</p><p>With npm:</p><pre>// NPM<br>npm  install  xlsx</pre><pre>// Yarn<br>yarn  add  xlsx</pre><p>In the <strong>app.js</strong> file, import xlsx and fs to read the excel file, and declare a variable that we will use later.</p><pre>const XLSX = require(&#39;xlsx&#39;);<br>const fs = require(&#39;fs&#39;);<br>const finalObject = {};</pre><p>To read and get the content of the file with the Buffer type :</p><pre>const data = XLSX.read(myFile, { type: &#39;buffer&#39; });</pre><p><em>N.B: The different types are “string”, “buffer”, “base64”, “binary”, “file”, “array”</em></p><p>If you write <strong>console.log(data.Sheet)</strong> you will see your spreadsheets and the cell&#39;s content.</p><p>Then you have to write the process for each row of each spreadsheet.</p><pre>data.SheetNames.forEach(sheetName =&gt; {<br>  let rowObject = XLSX.utils.sheet_to_json(data.Sheets[sheetName]);</pre><pre>  finalObject[sheetName] = rowObject;<br>});</pre><p>The <strong>sheet_to_json</strong> function allows you to convert a spreadsheet into an array of objects.</p><p>It takes different optional parameters that you can find <a href="https://www.npmjs.com/package/xlsx">here</a></p><p>Here we won’t need anything.</p><p>If you do a console.log(<strong>rowObject</strong>), you will see that it contains an array, and each row of the spreadsheet is turned into an object like so:</p><pre>[<br>  { &quot;ID&quot;: 1, &quot;Last name&quot;: &quot;Doe&quot;, &quot;First name&quot;: &quot;John&quot; },</pre><pre>  { &quot;ID&quot;: 2, &quot;Last Name&quot;: &quot;Doe&quot;, &quot;First name&quot;: &quot;Jane&quot; }<br>]</pre><p>Do you remember the variable we declared at the beginning? It is time to use it. We are going to create a key for each spreadsheet and assign <strong>rowObject</strong> to it:</p><pre>data.SheetNames.forEach(sheetName =&gt; {<br>  let rowObject = XLSX.utils.sheet_to_json(data.Sheets[sheetName]);</pre><pre>  finalObject[sheetName] = rowObject;<br>});</pre><p>If you <strong>console.log(finalObject)</strong>:</p><pre>&quot;Utilisateurs&quot;: [<br>{ &quot;ID&quot;: 1, &quot;Last name&quot;: &quot;Doe&quot;, &quot;First name&quot;: &quot;John&quot; },<br>{ &quot;ID&quot;: 2, &quot;Last name&quot;: &quot;Doe&quot;, &quot;First name&quot;: &quot;Jane&quot; }<br>]</pre><p>If you want to write the output into a file, simply add this line:</p><pre>fs.writeFileSync(&#39;./target.json&#39;, JSON.stringify(dataObject));</pre><p>Voilà! 🎉</p><p>Now you know how to convert an Excel spreadsheet into JSON!</p><p>Originally posted on <a href="https://blog.ludivineachouri.com/">my blog</a>.</p><p><em>More content at</em><strong><em> </em></strong><a href="http://plainenglish.io/"><strong><em>plainenglish.io</em></strong></a><strong><em>.</em></strong><em> Sign up for our </em><a href="http://newsletter.plainenglish.io/"><strong><em>free weekly newsletter here</em></strong></a><strong><em>.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4439cc3d6a81" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/how-to-convert-xlsx-to-json-4439cc3d6a81">How to Convert XLSX to JSON</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>