<?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 Rohit Singh Rana on Medium]]></title>
        <description><![CDATA[Stories by Rohit Singh Rana on Medium]]></description>
        <link>https://medium.com/@rohitrana859?source=rss-cc27b2dc37c3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*bLB2JphWt_X1DqHuaikxFA.png</url>
            <title>Stories by Rohit Singh Rana on Medium</title>
            <link>https://medium.com/@rohitrana859?source=rss-cc27b2dc37c3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 19:16:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rohitrana859/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[Fully Automating TestFlight Releases in GitHub Actions: Build Numbers, Release Notes, and…]]></title>
            <link>https://medium.com/@rohitrana859/fully-automating-testflight-releases-in-github-actions-build-numbers-release-notes-and-36a7825d3ec3?source=rss-cc27b2dc37c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/36a7825d3ec3</guid>
            <dc:creator><![CDATA[Rohit Singh Rana]]></dc:creator>
            <pubDate>Thu, 16 Jul 2026 17:23:42 GMT</pubDate>
            <atom:updated>2026-07-16T17:27:26.289Z</atom:updated>
            <content:encoded><![CDATA[<h3>Fully Automating TestFlight Releases in GitHub Actions: Build Numbers, Release Notes, and Zero-Touch Uploads</h3><p><em>How to remove every manual step between merging a PR and a tester opening TestFlight.</em></p><h3>The problem</h3><p>Most mobile teams ship the same way at first: bump the build number by hand, archive locally or via CI, upload through Transporter or altool, write a &quot;What to Test&quot; note if there&#39;s time, add testers to a beta group. Every step is a place to forget something, and none of it scales past one or two environments.</p><p>Goal: <strong>merge a PR → a build shows up in TestFlight with real release notes and testers already assigned, no human in the loop.</strong></p><h3>Architecture: three jobs, one pipeline</h3><pre>build  →  upload-to-testflight  →  assign-beta-groups</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B8aVqG7nbxnnWI3MF5nk4g.png" /></figure><p>Trigger on PR merge to your main integration branch, plus a manual workflow_dispatch for ad-hoc builds. Normalize both entry points down to two inputs: <strong>environment</strong> and <strong>distribution type</strong> (internal/ad-hoc vs TestFlight). If distribution is TestFlight, no approval gate — selecting it means you intend to ship it.</p><h3>Problem 1: build numbers can’t come from a local counter</h3><p>github.run_number (or any CI-run counter) is tempting — free, monotonic, always available. But it knows nothing about what App Store Connect already has. Upload a build number ASC has seen before, and the upload gets rejected.</p><p>Fix: ask ASC what it already has, and compute max(existing builds) + 1, before building.</p><pre># Generate an ES256 JWT for App Store Connect API auth<br>signing_input = b64url(https://medium.com/header) + &quot;.&quot; + b64url(https://medium.com/payload)<br>result = subprocess.run([&quot;openssl&quot;, &quot;dgst&quot;, &quot;-sha256&quot;, &quot;-sign&quot;, key_path, input_path], ...)<br># openssl returns a DER-encoded signature — JWT ES256 wants raw r||s,<br># each left-padded to 32 bytes. Unwrap the DER structure manually.</pre><p>Two things worth knowing before you build this yourself:</p><ul><li><strong>Do it with stdlib + OpenSSL, not a library.</strong> macOS runners already have Python 3 and OpenSSL. No pip dependency to pin, audit, or have flagged by a scanner. The only fiddly part is that OpenSSL’s signature output is DER-encoded and JWT wants raw concatenated r || s — about 15 lines to unwrap.</li><li><strong>xcrun altool --generate-jwt may 401 against the REST API specifically from CI runners</strong>, even when it works locally. Hand-generating the JWT avoids the problem and turns out more portable across Xcode versions.</li><li><strong>The JWT payload needs </strong><strong>&quot;sub&quot;: &quot;user&quot; explicitly.</strong> Works without it for altool uploads, gets rejected on the REST endpoints (builds list, beta localizations, beta groups) without it.</li></ul><p>Fallback chain: explicit manual input → ASC-derived max+1 → CI run number. Wrap every ASC call so a bad key, timeout, or malformed response degrades a tier instead of failing the whole build.</p><h3>Problem 2: nobody reliably writes release notes</h3><p>“What to Test” is the first thing skipped under deadline pressure. Generate it from what already exists — the PR:</p><pre>Version: 1.4.2<br>Build No: 187<br>Environment: Staging</pre><pre>What&#39;s New:<br>- &lt;PR title, ticket prefix stripped&gt;<br>- &lt;recent commit subjects, deduped against the title&gt;</pre><p>No PR context (manual trigger)? Fall back to summarizing recent commit messages instead. Either way, no human has to remember to type anything.</p><p><strong>Watch for this bug:</strong> GitHub Actions silently empties a step <em>output</em> if it contains a substring that matches a registered secret — even one from an unrelated secret. If any of your identifiers (an account ID, app ID, whatever) happens to overlap a masked value, output built from it can come back blank with zero error or warning. Fix: don’t pass generated text through job outputs — write it to a file, upload it as a workflow artifact, download it in the next job. Artifacts skip the masking pass. If a GitHub Actions output looks mysteriously empty despite correct step logs, check for a secret-substring collision before assuming your script is wrong.</p><h3>Problem 3: attaching notes to a build that doesn’t exist yet</h3><p>Uploading the binary is one API call. App Store Connect doesn’t process it instantly — it can take several minutes before the build is even visible via the REST API, let alone ready to accept a localization write.</p><p>So after upload, poll:</p><pre>for attempt in $(seq 1 20); do<br>  # GET builds?filter[app]=...&amp;filter[version]=$BUILD_NUMBER<br>  # found it? break<br>  sleep 30<br>  # refresh the JWT halfway through — it&#39;s a 20-minute token<br>done</pre><p>Up to ~10 minutes, 30s apart, with a JWT refresh at the midpoint. Once the build resolves, PATCH or POST to the beta-build-localization endpoint with your generated notes. Run this step with continue-on-error: true — notes are a nice-to-have; ASC being slow shouldn&#39;t fail your whole pipeline.</p><h3>Problem 4: distributing to testers automatically</h3><p>Same build ID, one more call — assign it to your external tester group(s), IDs read from a secret (comma-separated). Make the whole job a no-op if that secret is empty, so the automation is safe to ship before the groups even exist in ASC.</p><p>Validate the IDs before sending:</p><pre>uuid_re = re.compile(r&#39;^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$&#39;, re.I)<br>ids = [g.strip() for g in group_ids.split(&#39;,&#39;) if uuid_re.match(g.strip())]</pre><p>A stray typo or trailing comma in a manually-edited secret shouldn’t turn into a cryptic 400 three jobs deep.</p><h3>What this buys you</h3><p>Before: several manual steps, and release notes reliably get skipped first.</p><p>After: merge → build appears in TestFlight with real, PR-derived notes and the right testers already added, zero human touches, typically within 15–20 minutes.</p><p>Honest lesson: the hard part was never “the automation.” It was undocumented platform behavior underneath it — altool’s JWT quirks, CI secret-masking swallowing unrelated output, ASC’s multi-minute processing lag. Budget more time for that than for the API calls themselves.</p><h3>Working Code</h3><p>Here’s the actual iOS code, cleaned into reusable form.</p><h3>1. ASC JWT generator (stdlib only)</h3><p>Save as scripts/asc_jwt.py:</p><pre>#!/usr/bin/env python3<br>&quot;&quot;&quot;<br>Generate a short-lived ES256 JWT for App Store Connect API auth.<br>Stdlib + openssl only — no PyJWT, no cryptography package.</pre><pre>Env vars required:<br>  ASC_KEY_ID     — API Key ID from App Store Connect<br>  ASC_ISSUER_ID  — Issuer ID from App Store Connect<br>  KEY_PATH       — path to the .p8 private key file</pre><pre>Prints the JWT to stdout. Empty output on failure (caller checks length).<br>&quot;&quot;&quot;<br>import json, time, base64, os, subprocess, tempfile, sys</pre><pre>key_id = os.environ[&quot;ASC_KEY_ID&quot;]<br>issuer_id = os.environ[&quot;ASC_ISSUER_ID&quot;]<br>key_path = os.environ[&quot;KEY_PATH&quot;]</pre><pre>def b64url(https://medium.com/data):<br>    return base64.urlsafe_b64encode(data).rstrip(b&quot;=&quot;).decode()</pre><pre>header = json.dumps({&quot;alg&quot;: &quot;ES256&quot;, &quot;kid&quot;: key_id, &quot;typ&quot;: &quot;JWT&quot;}, separators=(&quot;,&quot;, &quot;:&quot;))<br>payload = json.dumps(<br>    {&quot;sub&quot;: &quot;user&quot;, &quot;iss&quot;: issuer_id, &quot;exp&quot;: int(time.time()) + 1200, &quot;aud&quot;: &quot;appstoreconnect-v1&quot;},<br>    separators=(&quot;,&quot;, &quot;:&quot;),<br>)<br>signing_input = b64url(https://medium.com/header.encode()) + &quot;.&quot; + b64url(https://medium.com/payload.encode())</pre><pre>with tempfile.NamedTemporaryFile(suffix=&quot;.bin&quot;, delete=False) as tf:<br>    tf.write(signing_input.encode())<br>    input_path = tf.name</pre><pre>try:<br>    result = subprocess.run([&quot;openssl&quot;, &quot;dgst&quot;, &quot;-sha256&quot;, &quot;-sign&quot;, key_path, input_path], capture_output=True)<br>    if result.returncode != 0:<br>        print(&quot;&quot;, end=&quot;&quot;)<br>        sys.exit(0)</pre><pre>    # openssl returns DER-encoded ECDSA (r, s) — JWT ES256 wants raw r||s,<br>    # each left-padded to 32 bytes.<br>    der = result.stdout<br>    idx = 2<br>    if der[1] &amp; 0x80:<br>        idx = 3<br>    idx += 1<br>    r_len = der[idx]; idx += 1<br>    r = der[idx:idx + r_len]; idx += r_len<br>    idx += 1<br>    s_len = der[idx]; idx += 1<br>    s = der[idx:idx + s_len]<br>    r = r[-32:].rjust(32, b&quot;\x00&quot;)<br>    s = s[-32:].rjust(32, b&quot;\x00&quot;)</pre><pre>    print(signing_input + &quot;.&quot; + b64url(https://medium.com/r%20+%20s), end=&quot;&quot;)<br>finally:<br>    os.unlink(input_path)</pre><p>sub: user claim is mandatory — REST endpoints (builds, beta localizations, beta groups) reject the token without it, even though altool upload accepts it fine.</p><h3>2. Resolve next build number from ASC</h3><p>Save as scripts/resolve_ios_build_number.py:</p><pre>#!/usr/bin/env python3<br>&quot;&quot;&quot;<br>Resolve next iOS build number from App Store Connect.<br>Requires asc_jwt.py in the same directory.</pre><pre>Env vars required:<br>  ASC_KEY_ID, ASC_ISSUER_ID, KEY_PATH, APP_APPLE_ID</pre><pre>Usage:<br>  python3 resolve_ios_build_number.py --fallback 42<br>Prints resolved build number to stdout.<br>&quot;&quot;&quot;<br>import argparse, json, os, subprocess, sys, urllib.request, urllib.error</pre><pre>SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))</pre><pre>def get_jwt():<br>    result = subprocess.run([&quot;python3&quot;, os.path.join(SCRIPT_DIR, &quot;asc_jwt.py&quot;)], capture_output=True, text=True)<br>    return result.stdout.strip()</pre><pre>def main():<br>    parser = argparse.ArgumentParser()<br>    parser.add_argument(&quot;--fallback&quot;, type=int, required=True)<br>    args = parser.parse_args()</pre><pre>    app_id = os.environ.get(&quot;APP_APPLE_ID&quot;)<br>    if not app_id:<br>        print(f&quot;No APP_APPLE_ID — falling back to {args.fallback}&quot;, file=sys.stderr)<br>        print(args.fallback)<br>        return</pre><pre>    jwt = get_jwt()<br>    if not jwt:<br>        print(f&quot;JWT generation failed — falling back to {args.fallback}&quot;, file=sys.stderr)<br>        print(args.fallback)<br>        return</pre><pre>    req = urllib.request.Request(<br>        f&quot;https://api.appstoreconnect.apple.com/v1/apps/{app_id}/builds&quot;<br>        f&quot;?fields[builds]=version&amp;limit=200&quot;,<br>        headers={&quot;Authorization&quot;: f&quot;Bearer {jwt}&quot;},<br>    )<br>    try:<br>        with urllib.request.urlopen(req, timeout=30) as r:<br>            data = json.load(r)<br>    except (urllib.error.URLError, urllib.error.HTTPError) as e:<br>        print(f&quot;ASC API error: {e} — falling back to {args.fallback}&quot;, file=sys.stderr)<br>        print(args.fallback)<br>        return</pre><pre>    builds = data.get(&quot;data&quot;, [])<br>    resolved = max((int(b[&quot;attributes&quot;][&quot;version&quot;]) for b in builds), default=0) + 1<br>    print(f&quot;Resolved build number: {resolved}&quot;, file=sys.stderr)<br>    print(resolved)</pre><pre>if __name__ == &quot;__main__&quot;:<br>    main()</pre><h3>3. Push “What to Test” notes after upload</h3><p>Save as scripts/update_testflight_notes.py:</p><pre>#!/usr/bin/env python3<br>&quot;&quot;&quot;<br>Poll ASC for a build to finish processing, then set its<br>TestFlight &quot;What to Test&quot; (betaBuildLocalizations) text.<br>Requires asc_jwt.py in the same directory.</pre><pre>Env vars required: ASC_KEY_ID, ASC_ISSUER_ID, KEY_PATH, APP_APPLE_ID<br>Args: --build-number N --notes-file /path/to/notes.txt<br>Exits 0 either way — notes are best-effort, never fail the pipeline on this.<br>&quot;&quot;&quot;<br>import argparse, json, os, subprocess, sys, time, urllib.request, urllib.error</pre><pre>SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))</pre><pre>def get_jwt():<br>    result = subprocess.run([&quot;python3&quot;, os.path.join(SCRIPT_DIR, &quot;asc_jwt.py&quot;)], capture_output=True, text=True)<br>    return result.stdout.strip()</pre><pre>def api_get(url, jwt):<br>    req = urllib.request.Request(url, headers={&quot;Authorization&quot;: f&quot;Bearer {jwt}&quot;})<br>    with urllib.request.urlopen(req, timeout=30) as r:<br>        return json.load(r)</pre><pre>def api_write(url, jwt, body, method):<br>    req = urllib.request.Request(<br>        url, data=json.dumps(body).encode(),<br>        headers={&quot;Authorization&quot;: f&quot;Bearer {jwt}&quot;, &quot;Content-Type&quot;: &quot;application/json&quot;},<br>        method=method,<br>    )<br>    with urllib.request.urlopen(req, timeout=30) as r:<br>        return r.status</pre><pre>def main():<br>    parser = argparse.ArgumentParser()<br>    parser.add_argument(&quot;--build-number&quot;, required=True)<br>    parser.add_argument(&quot;--notes-file&quot;, required=True)<br>    args = parser.parse_args()</pre><pre>    app_id = os.environ.get(&quot;APP_APPLE_ID&quot;)<br>    if not app_id or not os.path.exists(args.notes_file):<br>        print(&quot;Missing APP_APPLE_ID or notes file — skipping&quot;, file=sys.stderr)<br>        return</pre><pre>    with open(args.notes_file) as f:<br>        notes = f.read()</pre><pre>    jwt = get_jwt()<br>    if not jwt:<br>        print(&quot;JWT generation failed — skipping&quot;, file=sys.stderr)<br>        return</pre><pre>    build_uuid = None<br>    for attempt in range(1, 21):<br>        try:<br>            data = api_get(<br>                f&quot;https://api.appstoreconnect.apple.com/v1/builds&quot;<br>                f&quot;?filter[app]={app_id}&amp;filter[version]={args.build_number}&quot;<br>                f&quot;&amp;fields[builds]=version,processingState&quot;,<br>                jwt,<br>            )<br>            found = data.get(&quot;data&quot;, [])<br>            if found:<br>                build_uuid = found[0][&quot;id&quot;]<br>                break<br>        except (urllib.error.URLError, urllib.error.HTTPError):<br>            pass<br>        print(f&quot;Build not found yet (attempt {attempt}/20), waiting 30s...&quot;, file=sys.stderr)<br>        time.sleep(30)<br>        if attempt == 10:<br>            jwt = get_jwt()  # 20-minute token, refresh halfway</pre><pre>    if not build_uuid:<br>        print(f&quot;Build {args.build_number} not found after 10 min — skipping&quot;, file=sys.stderr)<br>        return</pre><pre>    try:<br>        loc = api_get(f&quot;https://api.appstoreconnect.apple.com/v1/builds/{build_uuid}/betaBuildLocalizations&quot;, jwt)<br>        loc_id = loc.get(&quot;data&quot;, [{}])[0].get(&quot;id&quot;)<br>    except (urllib.error.URLError, urllib.error.HTTPError, IndexError):<br>        loc_id = None</pre><pre>    try:<br>        if loc_id:<br>            api_write(<br>                f&quot;https://api.appstoreconnect.apple.com/v1/betaBuildLocalizations/{loc_id}&quot;,<br>                jwt,<br>                {&quot;data&quot;: {&quot;type&quot;: &quot;betaBuildLocalizations&quot;, &quot;id&quot;: loc_id, &quot;attributes&quot;: {&quot;whatsNew&quot;: notes}}},<br>                &quot;PATCH&quot;,<br>            )<br>        else:<br>            api_write(<br>                &quot;https://api.appstoreconnect.apple.com/v1/betaBuildLocalizations&quot;,<br>                jwt,<br>                {<br>                    &quot;data&quot;: {<br>                        &quot;type&quot;: &quot;betaBuildLocalizations&quot;,<br>                        &quot;attributes&quot;: {&quot;locale&quot;: &quot;en-US&quot;, &quot;whatsNew&quot;: notes},<br>                        &quot;relationships&quot;: {&quot;build&quot;: {&quot;data&quot;: {&quot;type&quot;: &quot;builds&quot;, &quot;id&quot;: build_uuid}}},<br>                    }<br>                },<br>                &quot;POST&quot;,<br>            )<br>        print(f&quot;TestFlight notes updated for build {args.build_number}&quot;, file=sys.stderr)<br>    except (urllib.error.URLError, urllib.error.HTTPError) as e:<br>        print(f&quot;Failed to update notes: {e} — continuing anyway&quot;, file=sys.stderr)</pre><pre>if __name__ == &quot;__main__&quot;:<br>    main()</pre><h3>4. Wiring into GitHub Actions</h3><pre>- name: Write ASC API key<br>  env:<br>    ASC_API_KEY_BASE64: ${{ secrets.ASC_PRIVATE_KEY }}<br>  run: |<br>    mkdir -p &quot;$HOME/private_keys&quot;<br>    echo &quot;$ASC_API_KEY_BASE64&quot; | base64 -d &gt; &quot;$HOME/private_keys/key.p8&quot;<br>    chmod 600 &quot;$HOME/private_keys/key.p8&quot;</pre><pre>- name: Resolve build number<br>  id: build-number<br>  env:<br>    ASC_KEY_ID: ${{ secrets.ASC_KEY_ID }}<br>    ASC_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }}<br>    APP_APPLE_ID: ${{ secrets.ASC_APP_APPLE_ID }}<br>    KEY_PATH: /home/runner/private_keys/key.p8<br>  run: |<br>    NEXT=$(python3 scripts/resolve_ios_build_number.py --fallback &quot;${{ github.run_number }}&quot;)<br>    echo &quot;next_build_number=$NEXT&quot; &gt;&gt; &quot;$GITHUB_OUTPUT&quot;</pre><pre># ... archive + export IPA + xcrun altool --upload-app ...</pre><pre>- name: Update TestFlight notes<br>  continue-on-error: true<br>  env:<br>    ASC_KEY_ID: ${{ secrets.ASC_KEY_ID }}<br>    ASC_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }}<br>    APP_APPLE_ID: ${{ secrets.ASC_APP_APPLE_ID }}<br>    KEY_PATH: /home/runner/private_keys/key.p8<br>  run: |<br>    python3 scripts/update_testflight_notes.py \<br>      --build-number &quot;${{ steps.build-number.outputs.next_build_number }}&quot; \<br>      --notes-file /tmp/build_notes.txt</pre><p>Required secrets: ASC_KEY_ID, ASC_ISSUER_ID, ASC_PRIVATE_KEY (base64-encoded .p8), ASC_APP_APPLE_ID.</p><p>That’s the complete, drop-in-able set — three scripts, no dependencies beyond Python 3 and openssl, which every macOS runner already has.</p><p>If you’re building this for your own pipeline: start with the JWT script, verify it against ASC’s /v1/apps endpoint before wiring in build numbers or notes — everything downstream depends on that token working first.</p><p>Thanks for reading — if this saved you a manual TestFlight upload, drop a clap or a comment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=36a7825d3ec3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[GitHub Tips: How to Modify Committed Text Like A Pro]]></title>
            <link>https://medium.com/@rohitrana859/how-to-edit-committed-text-in-github-693f4191410e?source=rss-cc27b2dc37c3------2</link>
            <guid isPermaLink="false">https://medium.com/p/693f4191410e</guid>
            <dc:creator><![CDATA[Rohit Singh Rana]]></dc:creator>
            <pubDate>Mon, 29 Jan 2024 10:06:42 GMT</pubDate>
            <atom:updated>2024-05-28T03:50:37.139Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello, Everyone! If you’re looking for a guide on how to edit committed text in GitHub, you’re on the right page. Follow the steps below:</p><ol><li>Open your terminal or command prompt.</li><li>Just refer the attached screenshot. I want to change commit the text from ‘<strong>First Commit</strong>’ to ‘<strong>Last Commit</strong>’.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X7e8UjDguIkSu7qNom0xiQ.png" /></figure><p>3. Navigate to the directory where you cloned the GitHub repository using the cd command. ex: <strong>cd &lt;directory-path&gt;</strong><br>If you have not cloned the repo, so use ‘<strong>git clone &lt;repository_url</strong>&gt;’ to clone the repo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uI5alMa23j3cj2OPttj8og.png" /></figure><p>4. Now you will be on your directory path</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OBtcRwZCdYVD5huFwKJ_7g.png" /></figure><p>5. Make sure there is no other rebase process is running on your directory path of project folder. If any other rebase process is running, run the command ‘<strong>git rebase --abort</strong>’</p><p>6. Run this command now ‘<strong>git rebase -i HEAD~2’<br>Note: </strong>2 is the number of commit text from last to first which you want to show.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ffYkBQyPQrPaOoMcsdl5uA.png" /></figure><p>Please read the following Commands for better understanding:</p><p># p, <strong>pick</strong> &lt;commit&gt; = use commit<br># r, <strong>reword</strong> &lt;commit&gt; = use commit, but edit the commit message<br># e, <strong>edit</strong> &lt;commit&gt; = use commit, but stop for amending<br># s, <strong>squash</strong> &lt;commit&gt; = use commit, but meld into previous commit</p><p>7. When you scroll to the top of your command prompt (cmd) screen, you’ll observe the display of the last two commit messages. Position the cursor at the beginning of the line that you wish to modify.</p><p>8. Press ‘i’ and you will be in edited mode. Replace the text ‘pick’ with ‘reword’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v6ec3IhV85rRnHeblj3qIg.png" /></figure><p>After this, press ‘Esc’ and then press ‘shift+z+z’</p><p>9. Now you will land on the prompt where you can edit the text you want. Follow the same procedure.</p><p>Press ‘i’ and you will be in edited mode. Then edit the text. <br>ex: I edited the text ‘First Commit’ to ‘Last Commit’</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HBjGdIJJntlTbIqVCQZ4gQ.png" /></figure><p>After this, press ‘Esc’ and then press ‘shift+z+z’</p><p>10. Now run following commands one by one in order:<br><strong>git commit --amend<br>git rebase --continue<br>git push -f</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WR9mIW0k28QMWelh58CHog.png" /></figure><p>After running ‘<strong>git push -f’ </strong>you the prompt screen the above attached screen with success text ‘forced update’.</p><p>Now that you’ve followed the steps to edit committed text, the commit message in your GitHub repository will be updated with the new commit text. Your changes are reflected in the commit history, allowing for clearer and more accurate documentation of your project’s development.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*biwapnw1tLlRkMLL89hnBA.png" /></figure><p>This straightforward process enhances the overall organization of your codebase and ensures that your commit messages align with the latest changes made to your project.</p><p>Happy coding! 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=693f4191410e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>