<?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: Altariarite</title>
    <description>The latest articles on Forem by Altariarite (@altariarite).</description>
    <link>https://forem.com/altariarite</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%2F538094%2Fecc11bf1-f06e-4934-81e7-0f8dfe05e0e5.jpeg</url>
      <title>Forem: Altariarite</title>
      <link>https://forem.com/altariarite</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/altariarite"/>
    <language>en</language>
    <item>
      <title>A version control tutorial with jj: Submit and Perfect Your PR</title>
      <dc:creator>Altariarite</dc:creator>
      <pubDate>Sat, 30 Aug 2025 20:43:09 +0000</pubDate>
      <link>https://forem.com/altariarite/a-version-control-workflow-with-jj-submit-and-perfect-your-pr-3l63</link>
      <guid>https://forem.com/altariarite/a-version-control-workflow-with-jj-submit-and-perfect-your-pr-3l63</guid>
      <description>&lt;p&gt;In the first part of the series, we looked at how to set up a jj repo and make our first push to GitHub. We touched on "commit"s and bookmarks in jj. Be sure to check out that one if you don't know what these words mean!&lt;/p&gt;

&lt;p&gt;Now we get into the more interesting stuff: how to submit PRs and edit them easily. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: I've since shortened the id for a jj commit to 4 characters in the &lt;a href="https://gist.github.com/Altariarite/0c11fbf8c73d802a4261e1031dd12977" rel="noopener noreferrer"&gt;config&lt;/a&gt; by setting &lt;code&gt;'format_short_id(id)' = 'id.shortest(4)'&lt;/code&gt; under &lt;code&gt;template-aliases&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  0: Old friends, new friends, immutable friends
&lt;/h3&gt;

&lt;p&gt;Before doing anything, let's run &lt;code&gt;jj log&lt;/code&gt; again to check the status after our first push.&lt;/p&gt;

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

&lt;p&gt;Hmm, something unusual is going on here. We said in the first tutorial that the line starting with &lt;code&gt;◆&lt;/code&gt; is the &lt;strong&gt;root commit&lt;/strong&gt;.  Why is the root commit not shown here? Why is the &lt;code&gt;◆&lt;/code&gt; on our previous commit? And what is this &lt;code&gt;~&lt;/code&gt; thing? &lt;/p&gt;

&lt;p&gt;Let's tackle these one by one. First of all,  &lt;code&gt;~&lt;/code&gt; means that there are more commits to be shown. We can see all the commits by running &lt;code&gt;jj log -r 'all()'&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;&lt;code&gt;◆&lt;/code&gt; marks the root commit, but it also marks our "Add hello world" commit &lt;code&gt;xvux&lt;/code&gt; that we just pushed to main. It means these are immutable commits. Indeed, if we try to edit it, we would get an error.&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="o"&gt;&amp;gt;&lt;/span&gt; jj edit x                                                                                                                                                                         &lt;span class="o"&gt;(&lt;/span&gt;base&lt;span class="o"&gt;)&lt;/span&gt;
Error: Commit 47b0d687d09c is immutable
Hint: Could not modify commit: xvux main | Add hello world
Hint: Immutable commits are used to protect shared history.
Hint: For more information, see:
      - https://jj-vcs.github.io/jj/latest/config/#set-of-immutable-commits
      - &lt;span class="sb"&gt;`&lt;/span&gt;jj &lt;span class="nb"&gt;help&lt;/span&gt; &lt;span class="nt"&gt;-k&lt;/span&gt; config&lt;span class="sb"&gt;`&lt;/span&gt;, &lt;span class="s2"&gt;"Set of immutable commits"&lt;/span&gt;
Hint: This operation would rewrite 1 immutable commits.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since these commits cannot be modified, they are not very interesting to us. So &lt;code&gt;jj&lt;/code&gt; hides them by default and only shows the latest immutable commit. I quite like that.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: technically the commit can be modified if you "force push" to main, but it is a very dangerous operation! We will not cover it here.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now to the actual PR.&lt;/p&gt;

&lt;h3&gt;
  
  
  1: Create a Pull Request 🚀
&lt;/h3&gt;

&lt;p&gt;Let's wrap our hello world in a function. We will make an intentional spelling error to be fixed later.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;hellp&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;hello world!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's commit like before:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jj commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"my first pr"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;We could create a new bookmark like we did before, but I am lazy and choose to let &lt;code&gt;jj&lt;/code&gt; do it automatically this time.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jj git push &lt;span class="nt"&gt;--change&lt;/span&gt; t
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;jj&lt;/code&gt; will generate a bookmark on that commit and push. It will also generate a link for you to open a pull request.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Creating bookmark push-tsnxozwsqwwt &lt;span class="k"&gt;for &lt;/span&gt;revision tsnxozwsqwwt
Changes to push to origin:
  Add bookmark &amp;lt;your-bookmark&amp;gt; to &amp;lt;some string&amp;gt;
remote:
remote: Create a pull request &lt;span class="k"&gt;for&lt;/span&gt; &amp;lt;your-bookmark&amp;gt; on GitHub by visiting:
remote:      https://github.com/&amp;lt;your-repo&amp;gt;/pull/new/&amp;lt;your-bookmark&amp;gt;
remote:
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;h3&gt;
  
  
  2: Edit the PR with Feedback 🔄
&lt;/h3&gt;

&lt;p&gt;Code review is a conversation and usually involves multiple back and forth edits. Let’s say a teammate reviews your PR and asks you to fix the typo. &lt;/p&gt;

&lt;p&gt;With &lt;code&gt;jj&lt;/code&gt;, there are ways to directly &lt;strong&gt;edit the original commit&lt;/strong&gt;, which keeps the history clean.&lt;/p&gt;

&lt;h4&gt;
  
  
  Fixing the typo
&lt;/h4&gt;

&lt;p&gt;After you write the fix, run &lt;code&gt;jj diff&lt;/code&gt;. We see that saved changes are reflected.&lt;/p&gt;

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

&lt;p&gt;Since the fix is happening in the "Working copy", it is now one commit ahead of our original commit. We want to move the fix down to our original commit.&lt;/p&gt;

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

&lt;p&gt;&lt;code&gt;jj squash&lt;/code&gt; will do exactly that. It takes our new change and move it down to the commit we pushed. Our bookmark will have a &lt;code&gt;*&lt;/code&gt;, indicating that something changed in this commit.&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="o"&gt;&amp;gt;&lt;/span&gt; jj squash

Working copy  &lt;span class="o"&gt;(&lt;/span&gt;@&lt;span class="o"&gt;)&lt;/span&gt; now at: slzw &lt;span class="o"&gt;(&lt;/span&gt;empty&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;no description &lt;span class="nb"&gt;set&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
Parent commit &lt;span class="o"&gt;(&lt;/span&gt;@-&lt;span class="o"&gt;)&lt;/span&gt;      : tsnx push-tsnxozwsqwwt&lt;span class="k"&gt;*&lt;/span&gt; | my first &lt;span class="nb"&gt;pr&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Running &lt;code&gt;jj git push&lt;/code&gt; will push our fix to the branch and to the PR. This way you won't clutter the PR with commits like "Fix typo".&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="o"&gt;&amp;gt;&lt;/span&gt; jj git push

Changes to push to origin:
Move sideways bookmark push-tsnxozwsqwwt from 4bb496b59686 to 80c14a7f4239
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;h4&gt;
  
  
  Changing the commit message
&lt;/h4&gt;

&lt;p&gt;Another teammate points out that your commit message and PR title shouldn't be named "my first pr" but something like "Refactor to hello()". That's a good point! The commit message is very easy to change in &lt;code&gt;jj&lt;/code&gt; . &lt;/p&gt;

&lt;p&gt;All we need is  &lt;code&gt;jj describe -r t -m "Refactor to hello()&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: &lt;code&gt;-r&lt;/code&gt; stands for "revision", a synonym to "commit". &lt;code&gt;t&lt;/code&gt; is the shortest unique id for our commit&lt;/p&gt;
&lt;/blockquote&gt;

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

&lt;p&gt;We can &lt;code&gt;jj git push&lt;/code&gt; again.&lt;/p&gt;

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

&lt;p&gt;And now the PR is ready to be merged! &lt;/p&gt;

&lt;p&gt;This is the place where our local history will start to diverge from the remote repo. The remote repo might also change because other people are working on it at the same time as you. In the next tutorial, we will explore how to deal with the difference and sync from remote to local. Stay tuned!&lt;/p&gt;

</description>
      <category>git</category>
      <category>jj</category>
      <category>github</category>
    </item>
    <item>
      <title>A version control tutorial with jj: Commit and push your first change</title>
      <dc:creator>Altariarite</dc:creator>
      <pubDate>Thu, 28 Aug 2025 23:35:05 +0000</pubDate>
      <link>https://forem.com/altariarite/write-commit-bookmark-push-a-jj-guide-for-beginners-2d59</link>
      <guid>https://forem.com/altariarite/write-commit-bookmark-push-a-jj-guide-for-beginners-2d59</guid>
      <description>&lt;p&gt;&lt;a href="https://github.com/jj-vcs/jj" rel="noopener noreferrer"&gt;jj&lt;/a&gt; is a shiny new version control system. I've been using it for a week now and it revolutionised my workflow with GitHub. It's simpler and more intuitive than git, but the official tutorial and the default UI can be a little daunting. &lt;/p&gt;

&lt;p&gt;This guide will start with a simpler &lt;code&gt;jj&lt;/code&gt; interface and walk you through common development workflows. We start from making a single change and go all the way to managing a stack of tiny pull requests. &lt;/p&gt;

&lt;p&gt;I hope I can show you why &lt;code&gt;jj&lt;/code&gt; feels amazing by the end! We'll use a simple Python project as our example. &lt;/p&gt;

&lt;h3&gt;
  
  
  Setup
&lt;/h3&gt;

&lt;p&gt;First, let's  set up our project and initialise it with &lt;code&gt;jj&lt;/code&gt; .&lt;/p&gt;

&lt;p&gt;1.  &lt;strong&gt;Create your project:&lt;/strong&gt;&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;mkdir &lt;/span&gt;jj-hello-world
&lt;span class="nb"&gt;cd &lt;/span&gt;jj-hello-world
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2.  &lt;strong&gt;Initialise &lt;code&gt;jj&lt;/code&gt; and git:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;jj&lt;/code&gt; works on top of a git repository, which allows it to integrate with platforms like GitHub.&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note before we start: The default &lt;code&gt;jj log&lt;/code&gt; shows a lot of stuff. That can be quite confusing for someone new to &lt;code&gt;jj&lt;/code&gt;.  When starting out I preferred to use a simpler interface. You can do that by writing &lt;a href="https://gist.github.com/Altariarite/0c11fbf8c73d802a4261e1031dd12977" rel="noopener noreferrer"&gt;some config&lt;/a&gt; to &lt;code&gt;~/.config/jj/config.toml&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  1. Your First Change
&lt;/h3&gt;

&lt;p&gt;Now our journey starts! We start by running  &lt;code&gt;jj log&lt;/code&gt;.&lt;/p&gt;

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

&lt;p&gt;Wow, what are all those things? 🤷‍♂️ A minute ago we just had an empty folder!&lt;/p&gt;

&lt;p&gt;Turns out, every new  &lt;code&gt;jj&lt;/code&gt; repository starts with two "commits":&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;The line starting with &lt;code&gt;◆&lt;/code&gt; is the &lt;strong&gt;root commit&lt;/strong&gt;. It's the special, empty starting point of your project's entire history, identified by all Zs (&lt;code&gt;zzzzzzzz&lt;/code&gt;). Think of it as the foundation upon which all your future work will be built.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The line starting with &lt;code&gt;@&lt;/code&gt; is your current &lt;strong&gt;working-copy commit&lt;/strong&gt;. The &lt;code&gt;@&lt;/code&gt; symbol means this is your active workspace where any new file changes will be automatically tracked. In a brand new repository, this commit is also &lt;code&gt;(empty)&lt;/code&gt; and has no description yet, ready for you to start coding. &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let's make a simple change.&lt;/p&gt;

&lt;p&gt;1.  &lt;strong&gt;Write a change:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Modify the &lt;code&gt;main.py&lt;/code&gt; file and save.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;hello world!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;jj&lt;/code&gt; automatically captures this change in your working copy. If we run &lt;code&gt;jj log&lt;/code&gt; again, you will see that the &lt;code&gt;(empty)&lt;/code&gt; tag is gone. &lt;code&gt;jj&lt;/code&gt; knows that we have changed something.&lt;/p&gt;

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

&lt;p&gt;We can see the change with &lt;code&gt;jj diff&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;2.  &lt;strong&gt;Commit your change:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jj commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Add hello world"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your &lt;code&gt;jj log&lt;/code&gt; will now show three commits: the root commit, the feature you committed just now, and a new empty working-copy commit you're now on. &lt;/p&gt;

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

&lt;blockquote&gt;
&lt;p&gt;💡Note: &lt;br&gt;
Your feature commit has the id &lt;code&gt;xvuxvpsx&lt;/code&gt;. That's exactly the same as the id of the previous working copy. The new working copy has a new id that starts with &lt;code&gt;m&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;3.  &lt;strong&gt;Sync and first push:&lt;/strong&gt;&lt;br&gt;
Let's push your feature. Create a new, empty repository on GitHub. Then, add it as a remote.&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="c"&gt;# Replace &amp;lt;your-github-url&amp;gt; with your repository's URL&lt;/span&gt;
jj git remote add origin &amp;lt;your-github-url&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We want to give our commit a "bookmark". Since GitHub is organised around named branches, this bookmark tells &lt;code&gt;jj&lt;/code&gt; which of your local commits should become a specific branch on the remote. We want to bookmark our feature commit as main.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jj bookmark create main &lt;span class="nt"&gt;-r&lt;/span&gt; x
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;💡Note: &lt;br&gt;
&lt;code&gt;-r&lt;/code&gt; stands for "revision", which is a synonym for "commit". And &lt;code&gt;x&lt;/code&gt; is the shortest unique id for our local commit.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Push to remote.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jj git push &lt;span class="nt"&gt;--allow-new&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now your feature is on GitHub! \o/ &lt;/p&gt;

&lt;p&gt;Next up, we will look at creating and fixing PRs (pull requests), which happens all the time when you collaborate with someone on GitHub, or sometimes even when you work alone. Stay tuned!&lt;/p&gt;

</description>
      <category>jj</category>
      <category>git</category>
      <category>github</category>
    </item>
  </channel>
</rss>
