<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="https://dariotrevino.com/feed.xml" rel="self" type="application/atom+xml" /><link href="https://dariotrevino.com/" rel="alternate" type="text/html" hreflang="en" /><updated>2026-11-14T12:36:53-06:00</updated><id>https://dariotrevino.com/feed.xml</id><title type="html">Dario Trevino</title><subtitle>Dario Trevino, Personal Website, Dario Blog, Cyber Security</subtitle><entry><title type="html">Thoughts on Free Will</title><link href="https://dariotrevino.com/posts/free-will/" rel="alternate" type="text/html" title="Thoughts on Free Will" /><published>2026-02-26T11:00:00-06:00</published><updated>2026-11-07T18:27:20-06:00</updated><id>https://dariotrevino.com/posts/free-will</id><content type="html" xml:base="https://dariotrevino.com/posts/free-will/"><![CDATA[<h1 id="free-will">Free Will</h1>

<p>I’ve been thinking about free will for a while now. It’s one of those topics that sounds simple on the surface but the deeper you go, the more it messes with you. Do we actually make choices, or are we just incredibly sophisticated dominoes falling in a sequence set in motion long before we were born?</p>

<h4 id="what-is-free-will">What is Free Will?</h4>

<p>Free will, at its core, is the idea that you are the author of your own actions. That when you decide to do something, that decision genuinely originates from <em>you</em> and could have gone differently. It’s the feeling you have when you pick what to eat for lunch, choose a career, or decide whether or not to say something you’ll regret.</p>

<p>There are generally three camps people fall into:</p>

<p><strong>Libertarian Free Will</strong> (not the political kind) says we have genuine, undetermined free will. Our choices are not fully caused by prior events.</p>

<p><strong>Hard Determinism</strong> says everything, including every thought and decision you’ve ever had, was determined by prior causes stretching back to the Big Bang. There is no room for free will.</p>

<p><strong>Compatibilism</strong> tries to meet in the middle. It says free will and determinism can coexist, and that “free will” just means acting according to your own desires without external coercion, even if those desires were themselves determined.</p>

<hr />

<h4 id="thought-exercise-maybe-we-do-have-free-will">Thought Exercise: Maybe We Do Have Free Will</h4>

<p>Imagine you’re standing at a crossroads, literally and figuratively. You can go left or go right. Nothing is forcing you. You think about it, weigh your options, and you go right.</p>

<p>Now ask yourself: what caused you to go right? Your reasoning. Your values. Your past experiences. Everything that makes <em>you</em>, you. In that sense, the decision came from you. Not from a coin flip, not from someone else’s hand pushing you. You deliberated, and you acted. That deliberation feels real because it is real.</p>

<p>There is also the question of <strong>quantum indeterminacy</strong>. At the subatomic level, the universe is not fully deterministic. Particles behave probabilistically. If the physical world is not fully determined, maybe there is room somewhere in the brain for genuine, undetermined choice to emerge from that randomness.</p>

<p>Add to this the undeniable experience of <strong>moral responsibility</strong>. We hold people accountable for their actions every day. We praise people for courage and condemn people for cruelty. This entire framework of justice and praise only makes sense if people could have done otherwise. The fact that human civilization has built itself around the assumption of free will might mean we are onto something.</p>

<hr />

<h4 id="thought-exercise-maybe-we-dont">Thought Exercise: Maybe We Don’t</h4>

<p>Now flip it. Think about the last “decision” you made. Before you were conscious of making it, your brain had already begun preparing for it. A famous set of neuroscience experiments by Benjamin Libet in the 1980s showed that brain activity associated with a movement begins several hundred milliseconds before a person is consciously aware of deciding to move. Your brain acts, and then you <em>feel</em> like you decided. Consciousness might just be along for the ride.</p>

<p>Zoom out further. You didn’t choose your genes. You didn’t choose your parents, your childhood, your culture, or the first experiences that shaped your values and personality. Every preference you have, every instinct, every belief was installed in you by forces entirely outside your control. The “you” that seems to be making decisions is itself a product of causes you had no say in.</p>

<p>And if the universe is deterministic, then the state of every particle at the Big Bang fully determined every event that would follow, including the words you are reading right now, and every thought you will have in response to them. You were always going to read this. I was always going to write it.</p>

<p>Even if we bring quantum randomness into it, randomness is not freedom. A decision made partly by random quantum noise is not <em>your</em> decision any more than a die roll is. Trading determinism for randomness doesn’t get you free will. It just gets you chaos.</p>

<hr />

<h4 id="so-does-free-will-exist">So, Does Free Will Exist?</h4>

<p>I don’t think it does. Not in the way we intuitively feel it does.</p>

<p>The version of free will most people believe in, where you could have genuinely chosen otherwise given the exact same brain, exact same history, and exact same moment in time, doesn’t hold up. The feeling of choice is real. The experience of deliberation is real. But the idea that some part of you exists outside the chain of cause and effect, pulling the strings from above, seems like an illusion the brain generates to make sense of itself.</p>

<p>That said, I find compatibilism the most <em>useful</em> framework even if it’s technically a rebranding of the problem. When you act according to your own reasoning and desires without someone holding a gun to your head, that is a meaningful kind of freedom worth preserving and talking about. Societies need to function, and moral responsibility isn’t going anywhere.</p>

<p>But knowing that your choices are the product of causes stretching back further than you can trace should inspire humility, not despair. The person who hurt you was shaped by forces they didn’t choose. So were you. That doesn’t mean consequences shouldn’t exist, but it does change how you see people, including yourself.</p>

<hr />

<h4 id="final-thoughts">Final Thoughts</h4>

<p>Free will is one of the few questions where the more seriously you take it, the more it dissolves under scrutiny. You are a universe experiencing itself through the lens of a brain that evolved to feel like it’s in control. That feeling of authorship is part of how the brain works, not evidence that it’s true.</p>

<p>We don’t have free will. But we do have something just as interesting: the experience of being conscious, deliberating, feeling-creatures navigating a world we didn’t design. That’s worth thinking about.</p>]]></content><author><name></name></author><category term="Philosophy" /><category term="blog" /><category term="philosophy" /><summary type="html"><![CDATA[Free Will]]></summary></entry><entry><title type="html">How I Passed the CISSP Exam</title><link href="https://dariotrevino.com/posts/how-i-passed-cissp/" rel="alternate" type="text/html" title="How I Passed the CISSP Exam" /><published>2025-08-07T05:33:00-05:00</published><updated>2026-11-07T18:27:20-06:00</updated><id>https://dariotrevino.com/posts/how-i-passed-cissp</id><content type="html" xml:base="https://dariotrevino.com/posts/how-i-passed-cissp/"><![CDATA[<h1 id="i-passed-the-cissp-exam">I Passed the CISSP Exam!</h1>

<p>After months of studying, countless practice questions, and a lot of mental preparation, I’m excited to share that I’ve officially passed the <strong>Certified Information Systems Security Professional (CISSP)</strong> exam!</p>

<h2 id="why-i-pursued-the-cissp">Why I Pursued the CISSP</h2>

<p>The CISSP has long been regarded as one of the most respected certifications in cybersecurity. As someone who is serious about growing my career in information security, I saw it not just as a credential, but as a way to solidify and expand my knowledge across all eight domains of the (ISC)² Common Body of Knowledge.</p>

<h2 id="my-study-journey">My Study Journey</h2>

<p><strong>Study Duration:</strong> I studied for about 2 months of light studying and 4 weeks of putting in 10–20 hours per week. The final week was intense, I took the week off work before my Saturday exam to focus entirely on studying (basically 8 AM to midnight every day). It was the hardest I’ve ever studied for anything, but cramming everything into 4 weeks worked better for me than spreading it out over months. I’m glad I went all-in and crammed everything into a couple of weeks. It saved me from a lot of wasted time.</p>

<p>Preparing for the CISSP was no small feat. Here’s a breakdown of how I approached it along with my thoughts on each:</p>

<ul>
  <li>
    <p><a href="https://www.udemy.com/course/cissp-domain-1-2/?couponCode=KEEPLEARNING"><strong>Thor Pedersen’s Udemy Course (10/10)</strong></a>: This video series was fantastic. His voice felt a bit robotic at first, but you get used to it. I leaned heavily on the PDF study guides he provides and watched videos for topics I struggled with. I didn’t even have to take notes because everything was broken down in his PDFs. Highly recommend.</p>
  </li>
  <li>
    <p><a href="https://quantumexams.com"><strong>Quantum Exams (10/10)</strong></a>: These were the closest to the actual exam format. They tested my patience and confidence but were invaluable. If you take enough assessments, you’ll start to get repeat questions, but that isn’t necessarily bad, just make sure you completely understand why the answer is what it is. There were some fancy words thrown in that I felt excessive, not sure why it would be designed that way. I took a ton of quizzes because I would take them after getting bored of studying. I’m proof that QE is harder than the exam, here are my scores:</p>

    <ul>
      <li>
        <p>Practice Exam: 50</p>
      </li>
      <li>
        <p>CAT: 502.52, 659.86</p>
      </li>
      <li>
        <p>Quizzes: (7, 5, 6, 3, 7, 7, 6, 6, 7, 7, 5, 4, 6, 3, 7, 6, 6, 6)</p>
      </li>
    </ul>
  </li>
  <li>
    <p><strong>YouTube (9/10)</strong>: I created a <a href="https://youtube.com/playlist?list=PLyDW9wHbBH7LOlI4g6lETYgYgLuz4TEVg&amp;si=E-xpeQNkhWnCcU37">playlist</a> of helpful videos. Pete Zerger’s Exam Cram + the 2024 addendum is a must-watch. I also recommend listening to Kelly Handerhan’s video on the drive to the testing center to get into the CISO mindset.</p>
  </li>
  <li>
    <p><strong>Grok/ChatGPT (10/10)</strong>: I used AI to dive deeper into complex topics and create mnemonics for memorization. For example, it helped me break down security models in a way that stuck.</p>
  </li>
  <li>
    <p><strong>Pocket Prep App (10/10)</strong>: This app was great for on-the-go studying. The questions are written similarly to Quantum Exams, and after a few quizzes, it highlights your weakest domains. I used it during breaks, bathroom trips, or when I needed a change from my usual study routine. I averaged 7/10 or 8/10 on most quizzes.</p>
  </li>
</ul>

<p>Your goal should truly be understand the concepts, not just memorize answers.</p>

<h2 id="exam-day-experience">Exam Day Experience</h2>

<p>I was nervous going in, especially after most posts saying they were scoring 800+ on their CAT exams. I purchased the peace-of-mind voucher, so I figured even if I failed, I’d gain valuable experience for my next attempt. The exam was intense and felt similar to Quantum Exams, with a few easier questions sprinkled in that boosted my confidence. I wasn’t sure if it would stop at 100 questions, so I paced myself to leave at least 50 minutes (1 min/question) in case I had to go all the way to 150. When I saw “Congratulations” on the results paper, I could’ve kissed the testing center staff. The hard work paid off.</p>

<h2 id="reflections-and-advice">Reflections and Advice</h2>

<p>The CISSP is not just about technical knowledge. It really emphasizes <strong>thinking like a security leader</strong>, balancing business needs with security, and applying risk-based thinking. If you’re preparing for the exam:</p>

<ul>
  <li>Focus on understanding, not memorization</li>
  <li>Think like a <strong>manager</strong>, not just an engineer</li>
  <li>Practice reading questions carefully – many are designed to test nuance</li>
  <li>Schedule your exam when you’re about 50% ready. This gives you a deadline to create and execute a study plan so you won’t waste time getting distracted while you’re supposed to be “studying”.</li>
</ul>

<h2 id="whats-next">What’s Next?</h2>

<p>Earning the CISSP is a milestone, but not the end of the journey. I plan to:</p>

<ul>
  <li>Pursue other certifications (OSCP, CISM)</li>
  <li>After passing the OSCP I plan on enrolling in a graduate program
    <ul>
      <li>Either a MS in Cybersecurity from my Alma Mater UTSA, or an online MS in Cybersecurity like <a href="https://pe.gatech.edu/degrees/cybersecurity">Georgia Tech</a>.</li>
    </ul>
  </li>
  <li>Continue developing hands-on skills</li>
  <li>Keep learning and giving back to the InfoSec community</li>
  <li>Create more coding projects and utilize AI for development</li>
</ul>

<h2 id="final-thoughts">Final Thoughts</h2>

<p>I’m proud of this accomplishment and grateful for the support I received along the way. If you’re thinking about taking the CISSP—go for it. It’s a challenge worth tackling and a very rewarding accomplishment. Your future self will thank you for the hard work you’ll put into this exam.</p>]]></content><author><name></name></author><category term="Cybersecurity" /><category term="Blog" /><category term="Tech" /><category term="Cybersecurity" /><summary type="html"><![CDATA[I Passed the CISSP Exam!]]></summary></entry><entry><title type="html">Who’s Not Following You Back on Instagram? Here’s How to Find Out Safely</title><link href="https://dariotrevino.com/posts/whos-not-following-you-back-on-instagram/" rel="alternate" type="text/html" title="Who’s Not Following You Back on Instagram? Here’s How to Find Out Safely" /><published>2024-10-14T05:33:00-05:00</published><updated>2026-11-07T18:27:20-06:00</updated><id>https://dariotrevino.com/posts/whos-not-following-you-back-on-instagram</id><content type="html" xml:base="https://dariotrevino.com/posts/whos-not-following-you-back-on-instagram/"><![CDATA[<h3 id="introduction">Introduction</h3>
<p>Have you ever noticed a sudden drop in your follower count and wondered who is unfollowing you? Or perhaps you’re curious about identifying who isn’t truly a friend. I certainly was, so I did some digging into ways I could do this using Python. The primary objective is to retrieve your follower and following lists, then compare the two lists to find out who isn’t following you back.</p>

<h3 id="findings">Findings</h3>
<p>There are several methods for gathering your Instagram follower data. One approach is to use the Instagram API, which allows you to retrieve follow and following lists. However, Instagram’s API has become more restrictive, and official access requires approval for non-public data. Using bots or scrapers can trigger Instagram’s security measures which can potentially lead to Instagram blocking or restricting access to your account so caution is advised. </p>

<p>Another option is to use web scrapers like Selenium to scrape the Instagram web interface for data. However, this approach may also trigger Instagram’s security measures.</p>

<p>The safest and most convenient method is to use the <a href="https://instaloader.github.io">instaloader</a> Python library. Instaloader can fetch your followers and following lists without the need for Selenium or web scraping. Unlike Selenium, which requires logging into the site and simulating user actions, Instaloader utilizes Instagram’s public data, reducing the likelihood of triggering security features. Below are the steps on how to use Instaloader and the script you can run.</p>

<h3 id="code">Code</h3>

<ol>
  <li>Install instaloader</li>
</ol>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>pip <span class="nb">install </span>instaloader
</code></pre></div></div>

<ol>
  <li>Create Python Script</li>
</ol>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kn">import</span> <span class="n">instaloader</span>

<span class="c1"># Create an instance of Instaloader
</span><span class="n">L</span> <span class="o">=</span> <span class="n">instaloader</span><span class="p">.</span><span class="nc">Instaloader</span><span class="p">()</span>

<span class="c1"># Login to your Instagram account
</span><span class="n">L</span><span class="p">.</span><span class="nf">login</span><span class="p">(</span><span class="sh">"</span><span class="s">your_username</span><span class="sh">"</span><span class="p">,</span> <span class="sh">"</span><span class="s">your_password</span><span class="sh">"</span><span class="p">)</span>

<span class="c1"># Load the profile
</span><span class="n">profile</span> <span class="o">=</span> <span class="n">instaloader</span><span class="p">.</span><span class="n">Profile</span><span class="p">.</span><span class="nf">from_username</span><span class="p">(</span><span class="n">L</span><span class="p">.</span><span class="n">context</span><span class="p">,</span> <span class="sh">"</span><span class="s">your_username</span><span class="sh">"</span><span class="p">)</span>

<span class="c1"># Fetch the list of followers
</span><span class="n">followers</span> <span class="o">=</span> <span class="nf">set</span><span class="p">(</span><span class="n">follower</span><span class="p">.</span><span class="n">username</span> <span class="k">for</span> <span class="n">follower</span> <span class="ow">in</span> <span class="n">profile</span><span class="p">.</span><span class="nf">get_followers</span><span class="p">())</span>

<span class="c1"># Fetch the list of followees (people you are following)
</span><span class="n">followees</span> <span class="o">=</span> <span class="nf">set</span><span class="p">(</span><span class="n">followee</span><span class="p">.</span><span class="n">username</span> <span class="k">for</span> <span class="n">followee</span> <span class="ow">in</span> <span class="n">profile</span><span class="p">.</span><span class="nf">get_followees</span><span class="p">())</span>

<span class="c1"># Find the difference between the two sets
</span><span class="n">not_following_back</span> <span class="o">=</span> <span class="n">followees</span> <span class="o">-</span> <span class="n">followers</span>

<span class="nf">print</span><span class="p">(</span><span class="sh">"</span><span class="s">Users not following you back:</span><span class="sh">"</span><span class="p">,</span> <span class="n">not_following_back</span><span class="p">)</span>
</code></pre></div></div>
<h3 id="conclusion">Conclusion</h3>
<p>• Instaloader is safe, more efficient, and likely won’t trigger security measures.</p>

<p><strong>Pros:</strong>
• Instaloader uses Instagram’s public data, which reduces the risk of being flagged.
• It doesn’t require scraping the website using a browser, so it’s more efficient and clean.</p>

<p><strong>Cons:</strong>
• You still need to log in to get your followers and followees, but the API usage is less likely to trigger security measures compared to browser automation.</p>]]></content><author><name></name></author><category term="Technology" /><category term="Coding" /><category term="Tech" /><summary type="html"><![CDATA[Introduction Have you ever noticed a sudden drop in your follower count and wondered who is unfollowing you? Or perhaps you’re curious about identifying who isn’t truly a friend. I certainly was, so I did some digging into ways I could do this using Python. The primary objective is to retrieve your follower and following lists, then compare the two lists to find out who isn’t following you back.]]></summary></entry><entry><title type="html">Game Theory</title><link href="https://dariotrevino.com/posts/game-theory/" rel="alternate" type="text/html" title="Game Theory" /><published>2024-07-08T03:48:00-05:00</published><updated>2026-11-07T18:27:20-06:00</updated><id>https://dariotrevino.com/posts/game-theory</id><content type="html" xml:base="https://dariotrevino.com/posts/game-theory/"><![CDATA[<h1 id="game-theory">Game Theory</h1>
<p>Article based on this <a href="https://www.youtube.com/watch?v=mScpHTIi-kM">YouTube video</a></p>

<h4 id="what-is-game-theory">What is Game Theory?</h4>
<p>Game theory is a bit of a misnomer by being called game theory as you might think of it as a game - but it’s anything but. It has the potential of destroying the world.</p>

<h4 id="what-is-the-game">What is the game?</h4>
<p>Submit computer programs (strategies) that would play each other for 200 rounds. The goal of the game is for the strategy to win as many points as possible.</p>
<ul>
  <li>The games will be repeated 5x to ensure the successful strategy was not just a fluke.</li>
</ul>

<p>Tit for Tat: Starts by cooperating and then copies exactly what the opponent did in the last move. If they attack you, you attack back, but only once. If the opponent goes back to cooperating so do you.</p>
<ul>
  <li>You attack me, I’ll attack you. If you treat me right, I’ll treat you right.</li>
</ul>

<p>When you think about winning, you think about beating the other person. In most games, one person’s gain is another person’s loss. This is called a zero-sum game. But most of life is not zero-sum. To win you don’t need to get your reward from the other player.</p>

<ul>
  <li>You have to find those win win situations and unlock those rewards where cooperation pays.</li>
</ul>

<h4 id="examples-in-history">Examples in History</h4>
<ul>
  <li>Cold War (Nuclear warheads)</li>
</ul>

<h4 id="overall-takeaway-from-game-theory">Overall takeaway from Game Theory</h4>
<ol>
  <li>Be nice</li>
  <li>Be forgiving</li>
  <li>Don’t be a pushover (Don’t let others take advantage of you)</li>
</ol>

<h4 id="fascinating-thoughts">Fascinating Thoughts</h4>
<ul>
  <li>We get to make choices that don’t only change our future, but also the future of those we interact with.</li>
  <li>In the short term the environment shapes the player that determines who does well, but in the long run, it’s the players that shape the environment.</li>
  <li>Being nice is better than being nasty/mean. Nice guys don’t finish last after all.</li>
</ul>

<p>We’re all playing a game - the game of life. Make your decisions wisely as their impact may reach further than you think.</p>]]></content><author><name></name></author><category term="Philosophy" /><category term="Political Science" /><category term="blog" /><category term="philosophy" /><summary type="html"><![CDATA[Game Theory Article based on this YouTube video]]></summary></entry><entry><title type="html">How to Use Git</title><link href="https://dariotrevino.com/posts/how-to-git/" rel="alternate" type="text/html" title="How to Use Git" /><published>2024-02-02T02:48:00-06:00</published><updated>2026-11-07T18:27:20-06:00</updated><id>https://dariotrevino.com/posts/how-to-git</id><content type="html" xml:base="https://dariotrevino.com/posts/how-to-git/"><![CDATA[<p>When I was first introduced to Git and GitHub, I was taken aback by the complexity of just trying to do version control. I thought there were too many intricacies needed to just change one thing. Looking back at that time, I wish I would have had a simple guide of everything that Git is comprised of. This is what this post is supposed to be. I hope it helps.</p>

<p>You can use Git on the command line to do version control or clone, fork, pull, and merge repositories. With Git, you can always roll back to a previous version and you can go as far forward or back as you want.</p>

<h3 id="using-git-in-the-terminal">Using Git in the Terminal</h3>
<p>You can use your regular terminal or use the terminal in your IDE to follow these instructions.</p>

<h3 id="default-process">Default Process</h3>
<ol>
  <li>Open your terminal and navigate to the directory you want to put under version control.</li>
  <li>git init
    <ol>
      <li>This initializes an empty Git repository in your current directory</li>
      <li>This will create a .git directory in your current directory (Only visible if you adjust your view or ls -a in the terminal). It will be used to track your changes, commit changes and do version control.</li>
    </ol>
  </li>
  <li>git status
    <ol>
      <li>In order to start tracking the changes of the files, you need to add the files to a staging area. This is an intermediate place where you can pick and choose which files in your directory you want to commit.</li>
      <li>Files in red here are files in your current directory but are not yet in the staging area</li>
    </ol>
  </li>
  <li>git add .
    <ol>
      <li>. adds all of the files. You can also specify what file you want to add by typing the name of the file.</li>
    </ol>
  </li>
  <li>git status (again)
    <ol>
      <li>You will now see the file in green meaning that the file is now in the staging area and is ready to be committed.</li>
    </ol>
  </li>
  <li>git commit -m “initial commit”
    <ol>
      <li>-m stands for message and should be included in every commit. The message helps keep track of what changes you’ve made on each commit. Be as explicit as possible about what changes have been made.</li>
      <li>These messages are written in present tense by convention. (ex: Complete chapter 1 instead of Completed chapter 1).</li>
    </ol>
  </li>
</ol>

<h3 id="review-commits">Review commits</h3>
<ol>
  <li>git log
    <ol>
      <li>Shows you what was committed, at what time, and by who.</li>
      <li>Also includes a hash, to identify each commit.</li>
    </ol>
  </li>
</ol>

<p>If you already initialized git and are making modifications</p>
<ol>
  <li>git status
    <ol>
      <li>See what new files are in the directory that are not being tracked aka not in the staging area.</li>
    </ol>
  </li>
  <li>git add .</li>
  <li>git status</li>
  <li>git commit -m “complete second and third commit”
    <ol>
      <li>remember to write your message in present tense.</li>
    </ol>
  </li>
  <li>git log
    <ol>
      <li>View all of your commits</li>
      <li>(HEAD –&gt; main) is the current state that we are in.</li>
    </ol>
  </li>
</ol>

<h3 id="check-the-differences-between-your-current-version-and-the-last-save-point">Check the differences between your current version and the last save point</h3>
<ol>
  <li>git diff filename.txt
    <ol>
      <li>Part in red is what has been deleted</li>
      <li>Part in green is what has been added</li>
    </ol>
  </li>
</ol>

<h3 id="revert-back-to-the-last-commit-in-your-repository">Revert back to the last commit in your repository</h3>
<ol>
  <li>git checkout filename.txt
    <ol>
      <li>This command rolls back the file to the last version that was committed in our local repository.</li>
    </ol>
  </li>
</ol>

<h3 id="pushing-local-repository-to-github-remote-repo">Pushing Local repository to [[GitHub]] remote repo</h3>
<ol>
  <li>git remote add &lt; origin/name&gt; &lt; url &gt;
    <ol>
      <li>Telling your local git repository that I’ve created a remote repository somewhere on the internet and I want to transfer all of my commits there.</li>
      <li>Theoretically, you can name origin anything you want. It’s just the name of your remote, but origin is used by convention and highly recommended to use.</li>
      <li>Reason is because programmers are used to the conventional naming.</li>
      <li>In URL you will just paste the url of our remote repository on GitHub.</li>
    </ol>
  </li>
  <li>git push -u &lt; remote name/origin &gt; &lt; branch name/main &gt;
    <ol>
      <li>This line of code will push your local repo (.git) to the remote GitHub repo using the -u flag which will link up your remote and local repos.</li>
      <li>Main is the most common branch name, others use master instead.</li>
      <li>Depending on the size of your local repo this can take some time.</li>
    </ol>
  </li>
</ol>

<p>![[Pasted image 20231110201451.png]]
The local repository is the .git file inside of our finder directory and the remote repository is GitHub which hosts our code and hosts all of the changes that were made between all of the different commits.</p>

<p>Why have a staging area and not straight from the working directory to the repository?</p>
<ul>
  <li>Because you might not want to add all of your files to be tracked and committed. Staging area is a good place to tell git what to ignore and what you do want tracked.</li>
</ul>

<p>Each version is given a name via the commit message.</p>

<h3 id="remove-files-from-staging-area">Remove Files From Staging Area</h3>
<ol>
  <li>git rm –cached -r .
    <ol>
      <li>Removes all of the files in the staging area</li>
      <li>The -r flag stands for recursive</li>
      <li>The . means that all of the files from the staging area should be removed</li>
    </ol>
  </li>
</ol>

<h3 id="gitignore">.gitignore</h3>
<p>You can add files you don’t want to commit to GitHub to the .gitignore file. These files could be secret files, or anything else you don’t want in the open.</p>
<ol>
  <li>Open a terminal</li>
  <li>touch .gitignore
    <ol>
      <li>Git is looking for this specific file so the exact same case and wording.</li>
      <li>Touch creates a file</li>
    </ol>
  </li>
  <li>ls -a to view the file in the command line</li>
  <li>Inside of .gitignore
    <ol>
      <li>Specify the file you want to ignore in each line of the file</li>
      <li>You can comment using a #</li>
      <li>You can use an * as a wildcard which will ignore all of the files with a certain extension, used as follows: *.txt, *.log.</li>
    </ol>
  </li>
  <li>When you git add now, the files in .gitignore will not be added to the staging area.</li>
</ol>

<h3 id="git-clone">Git Clone</h3>
<p>Cloning a GitHub repository will take a repo hosted in GitHub and download it to your local repo on your computer.</p>
<ol>
  <li>git clone url
    <ol>
      <li>The URL will typically be from GitHub
        <ol>
          <li>Go to the repo and click on ‘Code’ and copy the HTTPS clone URL</li>
        </ol>
      </li>
      <li>A way to pull all of the versions and all of the commits of a remote repo and store them in your local directory.</li>
      <li>This allows you to stand on the shoulders of giants and continue where they left off.</li>
      <li>You will continue on your own branch of that project.</li>
      <li>You will have your own copy of a program that someone else wrote.</li>
    </ol>
  </li>
  <li>The objects will be received and loaded on your present working directory. You can then cd into the repo’s folder.</li>
</ol>

<h3 id="pull-requests-merging--branching">Pull Requests Merging &amp; Branching</h3>
<p>You can create a branch and start committing to the branch to experiment on an experimental branch. Simultaneously, you can commit code to the main branch. If you end up wanting to merge the new feature you can easily merge them back into the main branch.</p>

<ul>
  <li>Usually, there are many branches being worked on simultaneously. This is because people are developing new features, fixing bugs, and all of these things may break the main project. Only put into the main branch once you know everything is working fine.</li>
</ul>

<p>Branching</p>
<ol>
  <li>git branch name-of-branch</li>
  <li>You can check what branches you have by just writing <em>git branch</em> without the branch name
    <ol>
      <li>The asterisk * will show you which branch you are currently on</li>
    </ol>
  </li>
  <li>git checkout name-of-branch
    <ol>
      <li>Switch to the branch you specify</li>
    </ol>
  </li>
</ol>

<p>Merging</p>
<ol>
  <li>git merge name-of-branch
    <ol>
      <li>This opens up the Vim text editor and allows you to type out a merge message or you could just leave it empty.</li>
      <li>To close out Vim type :wq to save and quit.</li>
      <li>The previous branch will still exist.</li>
    </ol>
  </li>
  <li>git push origin main -u</li>
</ol>

<h3 id="forking-and-pull-requests">Forking and Pull Requests</h3>
<p>Forking: Copy others’ repositories. You can then clone the repository to work on it locally.
Pull Request: If a GitHub user only has read access to a repo, they will need to do a pull request (Kind of like a suggestion for the repo owner). We can’t push because we are not owners of the repository.</p>]]></content><author><name></name></author><category term="Technology" /><category term="Coding" /><category term="Tech" /><summary type="html"><![CDATA[When I was first introduced to Git and GitHub, I was taken aback by the complexity of just trying to do version control. I thought there were too many intricacies needed to just change one thing. Looking back at that time, I wish I would have had a simple guide of everything that Git is comprised of. This is what this post is supposed to be. I hope it helps.]]></summary></entry></feed>