<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/10-advanced-git-commands-p4kyadmly" -->

---
title: 10 Advanced Git Commands | daily.dev
description: Git has emerged as the standard tool for version control because of how powerful it is. It takes all of your commits from a featured branch and moves them on...
canonical: https://daily.dev/posts/10-advanced-git-commands-p4kyadmly
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: 10 Advanced Git Commands | daily.dev
og:description: Git has emerged as the standard tool for version control because of how powerful it is. It takes all of your commits from a featured branch and moves them on...
og:url: https://daily.dev/posts/10-advanced-git-commands-p4kyadmly
og:image: https://api.daily.dev/og/posts/P4kYAdMLy.png
og:image:alt: 10 Advanced Git Commands
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 10 Advanced Git Commands

**[Earthly](https://daily.dev/sources/earthly)** · 10 min read · 251 upvotes · 11 comments

## Summary

Git has emerged as the standard tool for version control because of how powerful it is. It takes all of your commits from a featured branch and moves them on top of the main commit. It can also make it easier to revert changes since you can simply revert a single commit rather than dealing with the complexity of merging branches.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://earthly.dev/blog/advanced-git-commands/>

## Community discussion

Top comments from developers on daily.dev.

**@jimish** · 9 upvotes

> Let me add few more which are essential to know
>
> To update remote url
> `git remote set-url <remote_name> <remote_url>`
>
>
> To pick specific commit
>   `git cherry-pick <commit_id>`

**@mugiwara** · 5 upvotes

> Few other commands that I find are quite helpful -
>
> 1. worktree - helps you to seamlessly switch between branches without having to stash or commit your changes. Useful when you want to work on two different requirements simultaneously.
> 2. cherry-pick - helps you to cherry pick commits to another branch. Generally useful when you want to back port changes to a release branch after fixing some bug and pushing the code to master.

**@dylandenny** · 1 upvotes

> Happy to learn about Git Reflog, wasn't aware if it earlier

**@neenadingole** · 1 upvotes

> never tried `git grep` and `git clean` before, thanks for sharing

**@gwiecek** · 0 upvotes

> Very nice reminder. Thanks.

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 1 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments
- [CNCF Unveils Schedule for KubeCon \+ CloudNativeCon Europe 2026](https://daily.dev/posts/cncf-unveils-schedule-for-kubecon-cloudnativecon-europe-2026-ikhcoa5cb) · CNCF · 2 upvotes · 0 comments
- [CNCF Debuts KubeCon \+ CloudNativeCon Japan 2026 Schedule](https://daily.dev/posts/cncf-debuts-kubecon-cloudnativecon-japan-2026-schedule-xp5pyudub) · CNCF · 1 upvotes · 0 comments

---

Tags: [#git](https://daily.dev/tags/git)

[View this post on daily.dev](https://daily.dev/posts/10-advanced-git-commands-p4kyadmly)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"10 Advanced Git Commands","url":"https://daily.dev/posts/10-advanced-git-commands-p4kyadmly","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/10-advanced-git-commands-p4kyadmly"},"datePublished":"2023-04-21T20:08:37.104Z","dateModified":"2023-04-21T20:08:37.102Z","description":"Git has emerged as the standard tool for version control because of how powerful it is. It takes all of your commits from a featured branch and moves them on...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d14089fcf09784fc737e695c785c6b89?_a=AQADKdt","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d14089fcf09784fc737e695c785c6b89?_a=AQADKdt","isAccessibleForFree":true,"articleSection":"Earthly","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Earthly","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/139a6e6902684ea1aa97ca01c0c8c92e","url":"https://daily.dev/sources/earthly"},"commentCount":11,"discussionUrl":"https://daily.dev/posts/10-advanced-git-commands-p4kyadmly","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":251},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":11}],"keywords":"git","timeRequired":"PT10M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Earthly","item":"https://daily.dev/sources/earthly"},{"@type":"ListItem","position":3,"name":"10 Advanced Git Commands"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/10-advanced-git-commands-p4kyadmly","comment":[{"@type":"Comment","text":"Let me add few more which are essential to know\nTo update remote url\ngit remote set-url &lt;remote_name&gt; &lt;remote_url&gt;\nTo pick specific commit\ngit cherry-pick &lt;commit_id&gt;","datePublished":"2023-04-22T04:42:39.998Z","dateModified":"2023-04-22T04:45:31.358Z","url":"https://daily.dev/posts/P4kYAdMLy#c-roe4OYmVz","author":{"@type":"Person","name":"Jimish Gamit","url":"https://daily.dev/jimish","image":"https://lh3.googleusercontent.com/a-/AOh14GhbRvOwH9FY1HgVxuZBZRUS1vy_saBRYaC7fvLuNw=s100"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":9}},{"@type":"Comment","text":"Few other commands that I find are quite helpful -\n\nworktree - helps you to seamlessly switch between branches without having to stash or commit your changes. Useful when you want to work on two different requirements simultaneously.\ncherry-pick - helps you to cherry pick commits to another branch. Generally useful when you want to back port changes to a release branch after fixing some bug and pushing the code to master.","datePublished":"2023-04-22T07:27:58.401Z","url":"https://daily.dev/posts/P4kYAdMLy#c-Upf1Zz3X0","author":{"@type":"Person","name":"Mugiwara-No Luffy","url":"https://daily.dev/mugiwara","image":"https://lh3.googleusercontent.com/a/ALm5wu3B2cBUPT7IwClaVZqDFBjjNmZk-YJbx3jkqvgIItc=s96-c"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":5}},{"@type":"Comment","text":"Happy to learn about Git Reflog, wasn’t aware if it earlier","datePublished":"2023-04-25T05:05:39.189Z","url":"https://daily.dev/posts/P4kYAdMLy#c-XXwr8BOmu","author":{"@type":"Person","name":"Dylan Denny","url":"https://daily.dev/dylandenny","image":"https://media.daily.dev/image/upload/s--O0TOmw4y--/f_auto/v1715772965/public/noProfile"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"never tried git grep and git clean before, thanks for sharing","datePublished":"2023-04-22T07:33:27.851Z","url":"https://daily.dev/posts/P4kYAdMLy#c-4pEWQwem8","author":{"@type":"Person","name":"Ninad Ingole","url":"https://daily.dev/neenadingole","image":"https://lh3.googleusercontent.com/a-/AFdZucr8Ej6-w_P8Xq-lRDVEdYlrHrbSIi8WW-H08yHHkhw=s100"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"Very nice reminder. Thanks.","datePublished":"2023-04-22T09:41:40.306Z","url":"https://daily.dev/posts/P4kYAdMLy#c-Be3uR8fev","author":{"@type":"Person","name":"Grzegorz Więcek","url":"https://daily.dev/gwiecek","image":"https://avatars.githubusercontent.com/u/52357166?v=4"}}]}
```

