AI 资讯
Git Graph Explained: Visualizing Merge, Rebase, and Cherry-Pick
Git is the ultimate tool for developers. Yet, branching strategies still confuse many of us. Commands like merge, rebase, and cherry-pick manipulate your commit history in completely different ways. If you just guess what they do, you risk ruining your team's shared history or losing track of your changes. The easiest way to understand Git is to visualize it. Let us look at exactly what happens to your Git graph when you run these three critical commands. 🏗️ Starting Point: Our Example Repository Imagine we have a standard repository. We branched off the main branch from commit B to work on a new feature in a feature branch. While we worked on our feature, someone else pushed commit C and D to main. Here is what our history looks like right now: C --- D [main] / A --- B \ E --- F [feature] main has two new commits: C and D. feature has two new commits: E and F. 🔀 1. Git Merge (The Safe Record Keeper) When you merge main into your feature branch (or vice versa), Git creates a special, brand-new commit called a merge commit. git checkout feature git merge main The Visual Graph After Merge: C ------- D ------ [main] / \ A --- B \ \ v E --- F --- G [feature] What happened under the hood? Git looked at the common ancestor (B), took the history of main (C and D), took the history of feature (E and F), and combined them. Commit G is the merge commit. It has two parent commits: F and D. Pros: 100% non-destructive. It preserves the exact historical timeline of when things actually happened. Cons: Your Git graph can quickly become a messy "train track" web if you have many developers merging constantly. 🚀 2. Git Rebase (The Clean History Rewriter) Rebase takes all the commits from your current branch, lifts them up, and replants them on top of the very last commit of the target branch. git checkout feature git rebase main The Visual Graph After Rebase: C --- D [main] / \ A --- B E' --- F' [feature] What happened under the hood? Git temporarily blew away commits E and F. It ca
AI 资讯
GitLab 2FA Lockout: How My Local SSH Key Saved the Day
I have two-factor authentication (2FA) enabled on most of my accounts using an authenticator app. Recently, while installing the app on another Android device, I tried to change the backup password, but it didn't work. As a result, I lost access, had to disable 2FA, and re-enable it using a different authenticator app. Setting up 2FA again wasn't a problem because I was still logged in to most of my accounts. However, I didn't have my GitLab recovery codes. GitLab offers only two ways to regain access: receiving a six-digit verification code via email or generating new recovery codes using an SSH key associated with the account. Receiving a verification code via email is the easiest way to recover your account, but having an SSH key can be incredibly useful when receiving an email verification code isn't an option. Whenever I configure GitLab in my local environment, I create an SSH key for authentication and commit signing, as I always sign commits in my repositories. I described this process in a previous article . Get New Recovery Codes Check the SSH keys on your machine: ls -la ~/.ssh Look for files named like id_rsa , or id_ed25519 . Run the following command to get new recovery codes: ssh -i ~/.ssh/id_ed25519 git@gitlab.com 2fa_recovery_codes Replace id_ed25519 with the name of your SSH key file. Copy one of the recovery codes Go to the sign in page Enter your username and password Provide the recovery code when prompted Now you're signed in! Disable 2FA and re-enable it—and don't forget to save your recovery codes somewhere safe this time.
开源项目
🔥 Koenkk / zigbee2mqtt - Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbe
GitHub热门项目 | Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨 | Stars: 15,462 | 133 stars this week | 语言: TypeScript
开源项目
🔥 seerr-team / seerr - Open-source media request and discovery manager for Jellyfin
GitHub热门项目 | Open-source media request and discovery manager for Jellyfin, Plex, and Emby. | Stars: 12,106 | 127 stars this week | 语言: TypeScript
开源项目
🔥 milos-agathon / forge3d - Rust‑first, cross‑platform wgpu/WebGPU renderer exposed to P
GitHub热门项目 | Rust‑first, cross‑platform wgpu/WebGPU renderer exposed to Python for fast, headless 3D rendering. Built in Rust, shipped as Python wheels. | Stars: 558 | 10 stars today | 语言: Rust
开源项目
🔥 rust-lang / rust-clippy - A bunch of lints to catch common mistakes and improve your R
GitHub热门项目 | A bunch of lints to catch common mistakes and improve your Rust code. Book: https://doc.rust-lang.org/clippy/ | Stars: 13,405 | 6 stars today | 语言: Rust
开源项目
🔥 moghtech / komodo - 🦎 a tool to build and deploy software on many servers 🦎
GitHub热门项目 | 🦎 a tool to build and deploy software on many servers 🦎 | Stars: 11,769 | 10 stars today | 语言: Rust
开源项目
🔥 NateBJones-Projects / OB1 - Open Brain — The infrastructure layer for your thinking. One
GitHub热门项目 | Open Brain — The infrastructure layer for your thinking. One database, one AI gateway, one chat channel — any AI plugs in. No middleware, no SaaS. | Stars: 4,357 | 14 stars today | 语言: TypeScript
开源项目
🔥 Narcooo / inkos - Story Creation AI Agent for novel, scripts, translation, int
GitHub热门项目 | Story Creation AI Agent for novel, scripts, translation, interactive games, and IP content | Stars: 8,614 | 55 stars today | 语言: TypeScript
开源项目
🔥 tangyoha / telegram_media_downloader - 基于Dineshkarthik的项目, 电报视频下载,电报资源下载,跨平台,支持web查看下载进度 ,支持bot下发指令
GitHub热门项目 | 基于Dineshkarthik的项目, 电报视频下载,电报资源下载,跨平台,支持web查看下载进度 ,支持bot下发指令下载,支持下载已经加入的私有群但是限制下载的资源, telegram media download,Download media files from a telegram conversation/chat/channel up to 2GiB per file | Stars: 5,440 | 7 stars today | 语言: JavaScript
开源项目
🔥 LiberatedPixelCup / Universal-LPC-Spritesheet-Character-Generator - Character Generator based on Universal-LPC-Spritesheet
GitHub热门项目 | Character Generator based on Universal-LPC-Spritesheet | Stars: 1,539 | 10 stars today | 语言: JavaScript
开源项目
🔥 pdone / lx-music-source - 洛雪音乐源
GitHub热门项目 | 洛雪音乐源 | Stars: 7,541 | 36 stars today | 语言: JavaScript
开源项目
🔥 Emily2040 / seedance-2.0 - Comprehensive production pipeline for quad-modal AI filmmaki
GitHub热门项目 | Comprehensive production pipeline for quad-modal AI filmmaking with Seedance 2.0 | Stars: 5,846 | 101 stars today | 语言: Python
开源项目
🔥 ccxt / ccxt - A unified trading API with more than 100 crypto exchanges an
GitHub热门项目 | A unified trading API with more than 100 crypto exchanges and prediction markets in JavaScript / TypeScript / Python / C# / PHP / Go / Java | Stars: 43,480 | 17 stars today | 语言: Python
开源项目
🔥 Huanshere / VideoLingo - Netflix-level subtitle cutting, translation, alignment, and
GitHub热门项目 | Netflix-level subtitle cutting, translation, alignment, and even dubbing - one-click fully automated AI video subtitle team | Netflix级字幕切割、翻译、对齐、甚至加上配音,一键全自动视频搬运AI字幕组 | Stars: 18,012 | 48 stars today | 语言: Python
开发者
YouTube Star AboFlah Made Streaming His Life. He Wants His Kids to Live Offline
AboFlah talks about his new goals, streaming for charity, and when it’s time to log off.
AI 资讯
Stacked Pull Requests: how I would split a Flutter feature into four reviewable layers
The problem is not the code I build Flutter apps. A normal feature touches four layers at once. Models and json parsing Repository and API client State management Screens and widgets When I ship that as one branch, the pull request is somewhere between 1,000 and 4,000 lines. And then one of two things happens. Either the reviewer opens 40 files, scrolls for ten minutes, and writes "looks good". That is not a review. That is a signature. Or the reviewer does the job properly, takes three days, and leaves a comment on the models file. Now every screen above it has to change. The writing was fast. The review was slow. That is the real bottleneck. The old workaround You already know it. Split the work into branches yourself. git checkout -b feat/booking-models git checkout -b feat/booking-repo # branched off models git checkout -b feat/booking-state # branched off repo git checkout -b feat/booking-ui # branched off state This works for about one day. Then a reviewer asks for a change in feat/booking-models , and you rebase three branches by hand. Then it happens again. Most people give up and go back to the giant branch. What stacked pull requests change On July 30 2026 GitHub put stacked pull requests into public preview. The idea is small. A stack is an ordered series of pull requests. Each pull request targets the one below it instead of targeting main . Only the bottom one targets main . PR #4 screens and widgets -> targets PR #3 PR #3 cubits and state -> targets PR #2 PR #2 repository and api -> targets PR #1 PR #1 models and parsing -> targets main Because each pull request only contains its own layer, opening PR #3 shows you the state management diff and nothing else. Not the models. Not the widgets. The Flutter example Say I am building a booking flow. Here is the same feature, sliced. PR 1 - models and json parsing. Around 190 lines. Targets main. class Booking { final String id ; final DateTime startsAt ; final BookingStatus status ; const Booking ({ required
开源项目
🔥 lodash / lodash - A modern JavaScript utility library delivering modularity, p
GitHub热门项目 | A modern JavaScript utility library delivering modularity, performance, & extras. | Stars: 61,273 | 26 stars this week | 语言: JavaScript
开源项目
🔥 Tracer-Cloud / opensre - Build your own AI SRE agents. The open source toolkit for th
GitHub热门项目 | Build your own AI SRE agents. The open source toolkit for the AI era. | Stars: 9,680 | 536 stars this week | 语言: Python
开源项目
🔥 modelcontextprotocol / python-sdk - The official Python SDK for Model Context Protocol servers a
GitHub热门项目 | The official Python SDK for Model Context Protocol servers and clients | Stars: 23,833 | 127 stars this week | 语言: Python