Close Menu
    Facebook X (Twitter) Instagram
    Wifi PortalWifi Portal
    • Blogging
    • SEO & Digital Marketing
    • WiFi / Internet & Networking
    • Cybersecurity
    • Tech Tools & Mobile / Apps
    • Privacy & Online Earning
    Facebook X (Twitter) Instagram
    Wifi PortalWifi Portal
    Home»Tech Tools & Mobile / Apps»5 Git features that actually feel like cheating
    Tech Tools & Mobile / Apps

    5 Git features that actually feel like cheating

    adminBy adminFebruary 17, 2026No Comments5 Mins Read
    Facebook Twitter LinkedIn Telegram Pinterest Tumblr Reddit WhatsApp Email
    5 Git features that actually feel like cheating
    Share
    Facebook Twitter LinkedIn Pinterest Email

    The git command-line tool has so many options, subcommands, and other features that it’s easy to miss out on some of the best. These features are lesser-known, but will help you take shortcuts and make the most out of Git.

    Git worktrees

    Git worktree is still one of my favorite features because it avoids so much pain and frustration. Put simply, the worktree command lets you work on multiple branches at the same time.

    How useful you find it will depend on how you use branches. If you’re working on larger projects, it’s quite likely that you’ll use feature branches, branches for specific bug fixes, and more. Switching branches while you’re working on them can be cumbersome and is prone to errors.

    You can create a new worktree and its branch all in one step:

    git worktree add 
    

    The last part of the path will be used for the new branch name:

    Adding a new git worktree with a message confirming its creation.

    The git branch command will then highlight worktrees in cyan, prefixed with a + symbol:

    The git branch command showing a worktree branch with a plus symbol, colored in cyan.

    Git aliases

    This feature isn’t a command, although it can help you make itself into one. You’ve probably heard about git aliases before; they’re essentially the same as normal Linux shell aliases, but specifically tailored for git subcommands.

    You’ll really appreciate their power once you start using them; if you haven’t already, make today the day you set up your first alias:

    git config --global alias.aliases 'config --get-regexp ^alias\.'
    

    This git config command shows the general pattern for creating aliases, and it’s a useful alias itself because it shows you a list of your current aliases. Once you’ve set it up, just run git aliases to see a list of all your current aliases:

    A git aliases command showing a list of aliases including "first" and "minilog."

    The general pattern to set an alias is simply:

    git config --global alias.[alias-name] [alias-command]
    

    Note that you should quote your command if it contains spaces. Here are some examples of useful aliases you can set up:

    • alias.dir rev-parse --show-toplevel makes git dir output the root path of the repository you are currently in
    • alias.treelog log --all --decorate --oneline --graph makes git treelog show a nicely formatted log with a branch graph and tags.
    • alias.last 'log -1 HEAD' makes git last show details of the most recent commit, including its author, date, and full message.

    You might find you end up with a lot of aliases for different git log formats. This is because the subcommand is so expressive, with many options, that it’s difficult to remember your favorites.

    Git submodules

    Git is a vital tool for source control, whether your project is small or large, centralised or distributed. Some of its features are tailored for very specific use cases, however, and the submodule command is one such example.

    Git submodules let you include one repository inside another. Although you can achieve something similar by copying the contents of a repo that your code depends on, submodules formalize this and avoid needless duplication.

    Submodules may be less necessary for public projects, which often use a package manager like NPM or Cargo to support dependencies. However, for private or personal projects, this can be overkill, so submodules are a useful alternative.

    Adding another repo as a submodule is straightforward:

    git submodule add url subdir
    

    Here, url references the dependency’s Git URL, which will be used to download its files into the directory named subdir.

    Once you’ve added a submodule, you should notice the appearance of a new file named .gitmodules. Just like with .gitignore, you should commit this file to your repository so it’s part of your project’s history and is available to other contributors:

    git add .gitmodules subdir
    git commit -m "added submodule"
    

    Git will only add a lightweight reference to the submodule via the .gitmodules file, so this is much more efficient than importing all the dependency’s files manually. You can still pull in upstream changes from that dependency, using submodule update:

    git submodule update --recursive --remote
    

    The Git GUI

    Did you know that Git comes with its own GUI app? OK, it’s not a serious challenger to Fork, GitHub Desktop, or even Lazygit, a TUI equivalent that looks just as good. But this tool is a great option if you like to keep things minimal, and its portability should ensure that it’s available on any system you use.

    The git gui app, with 4 panels showing unstaged and staged changes, a diff of the selected file, and a form to enter a message and commit.

    If your version doesn’t come with the tool (as it didn’t on my macOS system), you can install it using APT:

    sudo apt install git-gui
    

    Or you can install it using Homebrew:

    brew install git-gui
    

    The tool is most useful when committing code. Its interface splits into four simple panels showing unstaged and staged changes, a diff of the selected file, and a form to enter a message and commit.

    The git-gui app definitely won’t replace more advanced, featureful alternatives, but it can be a great way to quickly review and commit your code.

    The last-modified command

    Ending on a more experimental note, this final feature is a new one, so you should bear in mind that it’s subject to change. However, you can start using it right away (in Git 25.2+) and consider how it may fit into your workflow.

    The git last-modified command showing a list of files, each of which has a commit ID alongside it.

    This subcommand is pretty simple: it lists the git-controlled files in your current directory, alongside the commit ID containing their most recent change.

    By default, last-modified shows just the files in your current directory. Any directories will show the commit ID of the most recently changed file they contain. However, with the -r option, it will instead show all files below your current directory, including those in directories.

    git last-modified
    

    As with many git commands, you can limit last-modified’s output by revision or path, so you can tailor it to your exact needs. The output may be most useful in scripts and when building interfaces similar to GitHub’s file browser.

    cheating Features feel Git
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Telegram Email
    Previous ArticleSmartLoader Attack Uses Trojanized Oura MCP Server to Deploy StealC Infostealer
    Next Article 25 SEO Conferences to Attend in 2026
    admin
    • Website

    Related Posts

    6 of the coolest display innovations I saw from TCL at MWC, and some of them could be in your next phone

    March 6, 2026

    Avowed PS5 review: Obsidian’s fantasy action-RPG is better than ever on PlayStation 5

    March 6, 2026

    This 49-inch gaming monitor will get the job done without hurting your wallet too much

    March 6, 2026
    Add A Comment
    Leave A Reply Cancel Reply

    Search Blog
    About
    About

    At WifiPortal.tech, we share simple, easy-to-follow guides on cybersecurity, online privacy, and digital opportunities. Our goal is to help everyday users browse safely, protect personal data, and explore smart ways to earn online. Whether you’re new to the digital world or looking to strengthen your online knowledge, our content is here to keep you informed and secure.

    Trending Blogs

    Codenotary Trust delivers autonomous AI security for Linux and Kubernetes

    March 6, 2026

    6 of the coolest display innovations I saw from TCL at MWC, and some of them could be in your next phone

    March 6, 2026

    Plankey’s nomination as CISA director now in jeopardy

    March 6, 2026

    83% of ChatGPT carousels use Google Shopping data

    March 6, 2026
    Categories
    • Blogging (33)
    • Cybersecurity (626)
    • Privacy & Online Earning (92)
    • SEO & Digital Marketing (397)
    • Tech Tools & Mobile / Apps (763)
    • WiFi / Internet & Networking (112)

    Subscribe to Updates

    Stay updated with the latest tips on cybersecurity, online privacy, and digital opportunities straight to your inbox.

    WifiPortal.tech is a blogging platform focused on cybersecurity, online privacy, and digital opportunities. We share easy-to-follow guides, tips, and resources to help you stay safe online and explore new ways of working in the digital world.

    Our Picks

    Codenotary Trust delivers autonomous AI security for Linux and Kubernetes

    March 6, 2026

    6 of the coolest display innovations I saw from TCL at MWC, and some of them could be in your next phone

    March 6, 2026

    Plankey’s nomination as CISA director now in jeopardy

    March 6, 2026
    Most Popular
    • Codenotary Trust delivers autonomous AI security for Linux and Kubernetes
    • 6 of the coolest display innovations I saw from TCL at MWC, and some of them could be in your next phone
    • Plankey’s nomination as CISA director now in jeopardy
    • 83% of ChatGPT carousels use Google Shopping data
    • Avowed PS5 review: Obsidian’s fantasy action-RPG is better than ever on PlayStation 5
    • Chinese state hackers target telcos with new malware toolkit
    • How to Be the Trusted & Featured Brand
    • This 49-inch gaming monitor will get the job done without hurting your wallet too much
    © 2026 WifiPortal.tech. Designed by WifiPortal.tech.
    • Home
    • About Us
    • Contact Us
    • Privacy Policy
    • Terms and Conditions
    • Disclaimer

    Type above and press Enter to search. Press Esc to cancel.