<?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>DEV Community: Cristian Jonhson Alvarez</title>
    <description>The latest articles on DEV Community by Cristian Jonhson Alvarez (@cristian-jonhson).</description>
    <link>https://dev.to/cristian-jonhson</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%2F1490505%2F7d90a1a0-7c74-40a5-843a-d3b0528050cd.jpg</url>
      <title>DEV Community: Cristian Jonhson Alvarez</title>
      <link>https://dev.to/cristian-jonhson</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cristian-jonhson"/>
    <language>en</language>
    <item>
      <title>Reset, revert, and reflog: the ultimate guide to undoing commits without losing your repo</title>
      <dc:creator>Cristian Jonhson Alvarez</dc:creator>
      <pubDate>Wed, 10 Jun 2026 20:56:25 +0000</pubDate>
      <link>https://dev.to/cristian-jonhson/reset-revert-and-reflog-the-ultimate-guide-to-undoing-commits-without-losing-your-repo-3dp8</link>
      <guid>https://dev.to/cristian-jonhson/reset-revert-and-reflog-the-ultimate-guide-to-undoing-commits-without-losing-your-repo-3dp8</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;😰 &lt;strong&gt;Story time:&lt;/strong&gt; I ran &lt;code&gt;git reset --hard HEAD~1&lt;/code&gt;, force pushed… and then realized I needed that file back.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Not pushed yet → &lt;code&gt;reset&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Pushed + shared branch → &lt;code&gt;revert&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;“Lost” a commit → &lt;code&gt;git reflog&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The real-world scenario
&lt;/h2&gt;

&lt;p&gt;You’re working on a repo and you create commits like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;chore: remove compiled artifacts from the repository&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;chore: add .gitignore to exclude unnecessary files&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then you try to undo the last commit, you run &lt;code&gt;push --force-with-lease&lt;/code&gt;, and later you say:  &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“I need to recover that file.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let’s go step by step.&lt;/p&gt;




&lt;h2&gt;
  
  
  1) Undo the last commits: reset vs revert
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Rule of thumb:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Working alone / not pushed yet → use &lt;code&gt;reset&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;👥 Shared branch / already pushed → use &lt;code&gt;revert&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Before you copy/paste commands, get your current branch name:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git branch &lt;span class="nt"&gt;--show-current&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Use that value wherever you see &lt;code&gt;YOUR_BRANCH&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  Option A: &lt;code&gt;reset&lt;/code&gt; (rewrites history)
&lt;/h3&gt;

&lt;p&gt;Useful when you want those commits to &lt;strong&gt;disappear from the history&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Deletes commits and discards changes&lt;/strong&gt; (hard mode):
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git reset &lt;span class="nt"&gt;--hard&lt;/span&gt; HEAD~2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Deletes commits but keeps changes staged&lt;/strong&gt; (soft mode):
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git reset &lt;span class="nt"&gt;--soft&lt;/span&gt; HEAD~2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="crayons-card c-embed"&gt;

  &lt;br&gt;
&lt;strong&gt;GitHub note (force push):&lt;/strong&gt; If you already pushed, to make the remote match you must force push.&lt;br&gt;&lt;br&gt;
Avoid &lt;code&gt;--force&lt;/code&gt; and use:&lt;br&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push &lt;span class="nt"&gt;--force-with-lease&lt;/span&gt; origin YOUR_BRANCH
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;✅ &lt;code&gt;--force-with-lease&lt;/code&gt; is safer because it won’t overwrite remote work you don’t have locally.&lt;/p&gt;

&lt;p&gt;⚠️ If the branch is &lt;strong&gt;protected&lt;/strong&gt; (common on &lt;code&gt;main/master&lt;/code&gt;), GitHub may block force pushes.&lt;br&gt;

&lt;/p&gt;
&lt;/div&gt;



&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push &lt;span class="nt"&gt;--force-with-lease&lt;/span&gt; origin master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Option B: &lt;code&gt;revert&lt;/code&gt; (does NOT rewrite history)
&lt;/h3&gt;

&lt;p&gt;Recommended when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Other people are working on the repo&lt;/li&gt;
&lt;li&gt;The branch is shared&lt;/li&gt;
&lt;li&gt;The branch is protected (e.g., &lt;code&gt;main/master&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It creates &lt;strong&gt;new commits&lt;/strong&gt; that undo the changes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git revert &lt;span class="nt"&gt;--no-edit&lt;/span&gt; HEAD~2..HEAD
git push origin YOUR_BRANCH
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  2) Recover commits after &lt;code&gt;reset --hard&lt;/code&gt; with &lt;code&gt;reflog&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;If you ran:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git reset &lt;span class="nt"&gt;--hard&lt;/span&gt; HEAD~1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and then regretted it, your lifeline is:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Real example output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dc65430 HEAD@{0}: reset: moving to HEAD~1
3bfb189 HEAD@{1}: commit: chore: add .gitignore to exclude unnecessary files
dc65430 HEAD@{2}: commit: chore: remove compiled artifacts from the repository
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can see the “lost” commit still exists: &lt;code&gt;3bfb189&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;To return to that state:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git reset &lt;span class="nt"&gt;--hard&lt;/span&gt; 3bfb189
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you also want GitHub to match:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push &lt;span class="nt"&gt;--force-with-lease&lt;/span&gt; origin YOUR_BRANCH
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  3) Restore a specific file from an earlier commit
&lt;/h2&gt;

&lt;p&gt;Sometimes you don’t want to move the whole branch—only recover &lt;strong&gt;one file&lt;/strong&gt; that existed in a past commit.&lt;/p&gt;

&lt;h3&gt;
  
  
  Important
&lt;/h3&gt;

&lt;p&gt;This command &lt;em&gt;always&lt;/em&gt; requires a path:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git restore &lt;span class="nt"&gt;--source&lt;/span&gt; &amp;lt;COMMIT&amp;gt; &lt;span class="nt"&gt;--&lt;/span&gt; &amp;lt;FILE_PATH&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Common example: restore &lt;code&gt;.gitignore&lt;/code&gt; from &lt;code&gt;3bfb189&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 restore &lt;span class="nt"&gt;--source&lt;/span&gt; 3bfb189 &lt;span class="nt"&gt;--&lt;/span&gt; .gitignore
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then save it in history:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add .gitignore
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"chore: restore .gitignore"&lt;/span&gt;
git push origin YOUR_BRANCH
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;/p&gt;
  Don’t know the exact file path?
  &lt;br&gt;
List the files touched by that commit:&lt;br&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git show &lt;span class="nt"&gt;--name-status&lt;/span&gt; &lt;span class="nt"&gt;--pretty&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;""&lt;/span&gt; 3bfb189
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Or list everything that exists in that commit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git ls-tree &lt;span class="nt"&gt;-r&lt;/span&gt; 3bfb189 &lt;span class="nt"&gt;--name-only&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;br&gt;
&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Once you find the exact path, restore it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git restore &lt;span class="nt"&gt;--source&lt;/span&gt; 3bfb189 &lt;span class="nt"&gt;--&lt;/span&gt; real/path/to/file.ext
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Restore EVERYTHING from a commit (warning: overwrites)
&lt;/h3&gt;

&lt;p&gt;⚠️ This can overwrite local changes in your working tree:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git restore &lt;span class="nt"&gt;--source&lt;/span&gt; 3bfb189 &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  4) Change the last commit message
&lt;/h2&gt;

&lt;h3&gt;
  
  
  If you have NOT pushed yet
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git commit &lt;span class="nt"&gt;--amend&lt;/span&gt; &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"new message"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  If you ALREADY pushed to GitHub
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git commit &lt;span class="nt"&gt;--amend&lt;/span&gt; &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"new message"&lt;/span&gt;
git push &lt;span class="nt"&gt;--force-with-lease&lt;/span&gt; origin YOUR_BRANCH
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  5) Tips to avoid Git pain (seriously)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Before doing an aggressive reset, create a “backup branch”:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git branch backup-before-reset
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Prefer &lt;code&gt;--force-with-lease&lt;/code&gt; over &lt;code&gt;--force&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;If you’re working with a team, prefer &lt;code&gt;revert&lt;/code&gt; over &lt;code&gt;reset&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;reflog&lt;/code&gt; is your “secret history”: when something “disappears”, check &lt;code&gt;git reflog&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Wrap-up
&lt;/h2&gt;

&lt;p&gt;If you ever feel like you “lost” commits or files, remember:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;git reflog&lt;/code&gt;&lt;/strong&gt; finds the commit you can’t see anymore&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;git restore --source&lt;/code&gt;&lt;/strong&gt; restores specific files without breaking everything&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;reset&lt;/code&gt;&lt;/strong&gt; rewrites history (requires force push)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;revert&lt;/code&gt;&lt;/strong&gt; is team-friendly&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Your turn 👻
&lt;/h2&gt;

&lt;p&gt;What’s your worst Git mistake? Did you manage to recover it, or did you have to start over? Drop your story in the comments.&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>devops</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to Create a GitHub Repository from the Terminal Using GitHub CLI</title>
      <dc:creator>Cristian Jonhson Alvarez</dc:creator>
      <pubDate>Wed, 10 Jun 2026 20:44:15 +0000</pubDate>
      <link>https://dev.to/cristian-jonhson/how-to-create-a-github-repository-from-the-terminal-using-github-cli-2629</link>
      <guid>https://dev.to/cristian-jonhson/how-to-create-a-github-repository-from-the-terminal-using-github-cli-2629</guid>
      <description>&lt;p&gt;When working on a local project, we usually create the repository on GitHub first, copy the remote URL, and then connect it to our local project.&lt;/p&gt;

&lt;p&gt;But there is a cleaner way to do it directly from the terminal using &lt;strong&gt;GitHub CLI&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Initialize Git in Your Project
&lt;/h2&gt;

&lt;p&gt;Go to your project folder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;your-project-name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Initialize Git:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Authenticate with GitHub CLI
&lt;/h2&gt;

&lt;p&gt;If you have not logged in yet, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gh auth login
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;During the process, you can choose:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GitHub.com
SSH
Login with a web browser
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Create the Remote Repository from Local
&lt;/h2&gt;

&lt;p&gt;To create the repository on GitHub and add it as &lt;code&gt;origin&lt;/code&gt;, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gh repo create repository-name &lt;span class="nt"&gt;--public&lt;/span&gt; &lt;span class="nt"&gt;--source&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;--remote&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;origin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gh repo create IA_ML_DL_python_fundamentos &lt;span class="nt"&gt;--public&lt;/span&gt; &lt;span class="nt"&gt;--source&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;--remote&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;origin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For a private repository:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gh repo create repository-name &lt;span class="nt"&gt;--private&lt;/span&gt; &lt;span class="nt"&gt;--source&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;--remote&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;origin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Verify the Remote
&lt;/h2&gt;

&lt;p&gt;Check that &lt;code&gt;origin&lt;/code&gt; was added correctly:&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;p&gt;You should see something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;origin  git@github.com:username/repository-name.git &lt;span class="o"&gt;(&lt;/span&gt;fetch&lt;span class="o"&gt;)&lt;/span&gt;
origin  git@github.com:username/repository-name.git &lt;span class="o"&gt;(&lt;/span&gt;push&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5. Create the First Commit
&lt;/h2&gt;

&lt;p&gt;Add your files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create the first commit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Initial commit"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  6. Push the Project to GitHub
&lt;/h2&gt;

&lt;p&gt;Make sure your main branch is named &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 branch &lt;span class="nt"&gt;-M&lt;/span&gt; main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Push your project:&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Full Command Summary
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git init
gh auth login
gh repo create repository-name &lt;span class="nt"&gt;--public&lt;/span&gt; &lt;span class="nt"&gt;--source&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;--remote&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;origin
git add &lt;span class="nb"&gt;.&lt;/span&gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Initial commit"&lt;/span&gt;
git branch &lt;span class="nt"&gt;-M&lt;/span&gt; main
git push &lt;span class="nt"&gt;-u&lt;/span&gt; origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Using &lt;code&gt;gh repo create&lt;/code&gt; allows you to create a GitHub repository directly from the terminal, connect it as &lt;code&gt;origin&lt;/code&gt;, and push your local project without manually creating the repository from the browser.&lt;/p&gt;

&lt;p&gt;It is a faster, cleaner, and more professional workflow for starting new projects on GitHub.&lt;/p&gt;

</description>
      <category>github</category>
      <category>git</category>
      <category>cli</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Getting Started with AWS: A Practical Guide for Beginners</title>
      <dc:creator>Cristian Jonhson Alvarez</dc:creator>
      <pubDate>Mon, 06 Jan 2025 18:28:52 +0000</pubDate>
      <link>https://dev.to/cristian-jonhson/getting-started-with-aws-a-practical-guide-for-beginner-4aj1</link>
      <guid>https://dev.to/cristian-jonhson/getting-started-with-aws-a-practical-guide-for-beginner-4aj1</guid>
      <description>&lt;p&gt;By the end, you’ll know exactly what to learn first on AWS—and you’ll have 2 mini-projects to prove it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;✅ &lt;strong&gt;Plus&lt;/strong&gt;: you’ll set up Budgets on day one to avoid surprise costs.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Start with &lt;strong&gt;EC2, S3, IAM, RDS&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Build 1–2 tiny projects (static website + simple API)&lt;/li&gt;
&lt;li&gt;Keep costs under control from day one (Budgets + Free Tier)&lt;/li&gt;
&lt;li&gt;✅ “Set up AWS Budgets on day 1 to avoid surprise bills.”&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Table of contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;1. What is AWS, and why should you learn it?&lt;/li&gt;
&lt;li&gt;2. Create your AWS account (and avoid surprise costs)&lt;/li&gt;
&lt;li&gt;3. Get familiar with the AWS Console&lt;/li&gt;
&lt;li&gt;4. Learn the core services (first 4)&lt;/li&gt;
&lt;li&gt;5. Build your first projects&lt;/li&gt;
&lt;li&gt;6. Training and certifications&lt;/li&gt;
&lt;li&gt;7. Join the community&lt;/li&gt;
&lt;li&gt;8. Final tips&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  1. What is AWS, and why should you learn it?
&lt;/h2&gt;

&lt;p&gt;AWS is a set of cloud services that lets you build and run applications without managing physical servers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why learn AWS?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Job opportunities:&lt;/strong&gt; AWS skills are in high demand across dev, DevOps, data, and security.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Versatility:&lt;/strong&gt; You can build websites, APIs, databases, analytics, CI/CD, and more.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pay-as-you-go:&lt;/strong&gt; You can start small and only pay for what you use.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  2. Create your AWS account (and avoid surprise costs)
&lt;/h2&gt;

&lt;p&gt;To start, you need an AWS account:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to &lt;a href="https://aws.amazon.com/" rel="noopener noreferrer"&gt;https://aws.amazon.com/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create a Free Account&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Register with email + credit card (AWS uses it for verification and billing)&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;✅ &lt;strong&gt;Cost safety tip (do this immediately):&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Set up &lt;strong&gt;AWS Budgets&lt;/strong&gt; and billing alerts the same day you create the account.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;“Go to Billing → Budgets → Create budget (monthly)”.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Free Tier basics&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AWS offers a Free Tier for many services (some are 12 months, some always-free, some trials).&lt;/li&gt;
&lt;li&gt;Always check pricing pages before creating resources.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  3. Get familiar with the AWS Console
&lt;/h2&gt;

&lt;p&gt;The AWS Management Console is where you’ll create and manage services.&lt;/p&gt;

&lt;p&gt;Spend time on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Navigating services (search bar is your best friend)&lt;/li&gt;
&lt;li&gt;Switching &lt;strong&gt;regions&lt;/strong&gt; (top-right)&lt;/li&gt;
&lt;li&gt;Understanding IAM users/roles (more below)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pro tip:&lt;/strong&gt; Learn the AWS CLI once you’re comfortable in the console:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws &lt;span class="nt"&gt;--version&lt;/span&gt;
aws sts get-caller-identity
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  4. Learn the core services (first 4)
&lt;/h2&gt;

&lt;p&gt;If you only learn these 4 first, you’ll already understand most AWS basics.&lt;/p&gt;

&lt;h3&gt;
  
  
  4.1 EC2 (Elastic Compute Cloud)
&lt;/h3&gt;

&lt;p&gt;Virtual servers in the cloud.&lt;/p&gt;

&lt;p&gt;Practice:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Launch an instance (Amazon Linux / Ubuntu)&lt;/li&gt;
&lt;li&gt;Connect via SSH&lt;/li&gt;
&lt;li&gt;Stop/terminate it to avoid costs&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ Reminder: Stop/terminate your instance when done.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  4.2 S3 (Simple Storage Service)
&lt;/h3&gt;

&lt;p&gt;Object storage for files (images, backups, static websites).&lt;/p&gt;

&lt;p&gt;Practice:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a bucket&lt;/li&gt;
&lt;li&gt;Upload/download files&lt;/li&gt;
&lt;li&gt;Learn permissions (private vs public)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4.3 RDS (Relational Database Service)
&lt;/h3&gt;

&lt;p&gt;Managed databases (PostgreSQL, MySQL, etc).&lt;/p&gt;

&lt;p&gt;Practice:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a small PostgreSQL instance (Free Tier eligible if available)&lt;/li&gt;
&lt;li&gt;Connect from local app&lt;/li&gt;
&lt;li&gt;Learn basics: security groups + subnet groups&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4.4 IAM (Identity and Access Management)
&lt;/h3&gt;

&lt;p&gt;Users, roles, permissions.&lt;/p&gt;

&lt;p&gt;Practice:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create an IAM user with least privilege&lt;/li&gt;
&lt;li&gt;Create an IAM role (used by EC2/Lambda)&lt;/li&gt;
&lt;li&gt;Learn policies (managed vs inline)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;🔥 If you learn IAM early, you’ll avoid most “why is access denied?” pain later.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  5. Build your first projects
&lt;/h2&gt;

&lt;p&gt;The fastest way to learn AWS is to build.&lt;/p&gt;

&lt;h3&gt;
  
  
  Project 1: Static website with S3 + CloudFront
&lt;/h3&gt;

&lt;p&gt;Goal: host a simple website (HTML/CSS/JS) in S3 and deliver it via CDN.&lt;/p&gt;

&lt;p&gt;Steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Upload site files to S3&lt;/li&gt;
&lt;li&gt;Configure static hosting (or private bucket + CloudFront)&lt;/li&gt;
&lt;li&gt;(Optional) Add a custom domain with Route 53&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Project 2: Serverless API with Lambda + API Gateway
&lt;/h3&gt;

&lt;p&gt;Goal: create a tiny API endpoint (e.g., &lt;code&gt;/hello&lt;/code&gt;) without managing servers.&lt;/p&gt;

&lt;p&gt;Steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a Lambda function (Node/Python)&lt;/li&gt;
&lt;li&gt;Expose it via API Gateway&lt;/li&gt;
&lt;li&gt;Test it with curl/Postman&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  6. Training and certifications
&lt;/h2&gt;

&lt;p&gt;If you want a structured path:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AWS Skill Builder (official training)&lt;/li&gt;
&lt;li&gt;AWS Docs (learn service-by-service)&lt;/li&gt;
&lt;li&gt;YouTube channels / labs / hands-on projects&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A common first cert:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;AWS Certified Cloud Practitioner (CLF)&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  7. Join the community
&lt;/h2&gt;

&lt;p&gt;Learning is easier with people:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AWS re:Invent sessions (even recorded ones)&lt;/li&gt;
&lt;li&gt;Local meetups&lt;/li&gt;
&lt;li&gt;DEV posts / discussions / GitHub projects&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  8. Final tips
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Go one service at a time&lt;/strong&gt; — don’t try to learn everything.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Document your progress&lt;/strong&gt; — keep a repo or a DEV series.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Turn things off&lt;/strong&gt; — most surprise bills come from resources left running.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security mindset early&lt;/strong&gt; — IAM + least privilege always.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;AWS is huge, but starting doesn’t have to be complicated.&lt;br&gt;&lt;br&gt;
If you focus on the core services and build 1–2 small projects, you’ll quickly feel confident navigating AWS.&lt;/p&gt;




&lt;h2&gt;
  
  
  Your turn 👇
&lt;/h2&gt;

&lt;p&gt;What was the &lt;strong&gt;first AWS service&lt;/strong&gt; that “clicked” for you? - And what’s the best beginner project to learn it?&lt;/p&gt;

</description>
      <category>aws</category>
      <category>cloud</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
