<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/automate-your-git-workflow-with-this-simple-bash-script-ivzee8ewb" -->

---
title: Automate Your Git Workflow with this Simple Bash Script
description: This script aims to automate three core git actions: Switching to the branch you specify. Committing changes with a message you provide and pushing to the...
canonical: https://daily.dev/posts/automate-your-git-workflow-with-this-simple-bash-script-ivzee8ewb
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Automate Your Git Workflow with this Simple Bash Script | daily.dev
og:description: This script aims to automate three core git actions: Switching to the branch you specify. Committing changes with a message you provide and pushing to the...
og:url: https://daily.dev/posts/automate-your-git-workflow-with-this-simple-bash-script-ivzee8ewb
og:image: https://api.daily.dev/og/posts/iVZeE8EWb.png
og:image:alt: Automate Your Git Workflow with this Simple Bash Script
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.

# Automate Your Git Workflow with this Simple Bash Script

**[Community Picks](https://daily.dev/sources/community)** · 3 min read · 33 upvotes · 6 comments

## Summary

This script aims to automate three core git actions: Switching to the branch you specify. Committing changes with a message you provide and pushing to the specified branch. The magic gives us the count of arguments you've passed in. If it's not two, the script will remind you how to use it.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://dev.to/devrx/automate-your-git-workflow-with-this-simple-bash-script-5cm5>

## Community discussion

Top comments from developers on daily.dev.

**@ianneee** · 4 upvotes

> "git add ." ??? worst git script ever
>
> use  [aliases](https://git-scm.com/book/en/v2/Git-Basics-Git-Aliases)

**@mirzabilal** · 0 upvotes

> This is interesting. I have been using homegrown scripts but never compiled them in one comprehensive one like this. 👏

## 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: [#github](https://daily.dev/tags/github), [#git](https://daily.dev/tags/git)

[View this post on daily.dev](https://daily.dev/posts/automate-your-git-workflow-with-this-simple-bash-script-ivzee8ewb)

```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":"Automate Your Git Workflow with this Simple Bash Script","url":"https://daily.dev/posts/automate-your-git-workflow-with-this-simple-bash-script-ivzee8ewb","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/automate-your-git-workflow-with-this-simple-bash-script-ivzee8ewb"},"datePublished":"2023-08-27T14:27:43.326Z","dateModified":"2023-12-07T12:02:45.284Z","description":"This script aims to automate three core git actions: Switching to the branch you specify. Committing changes with a message you provide and pushing to the...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/dfb31ad10392ac5e336be21976f49058?_a=AQAEufR","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/dfb31ad10392ac5e336be21976f49058?_a=AQAEufR","isAccessibleForFree":true,"articleSection":"Community Picks","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":"Community Picks","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1655817725/logos/community","url":"https://daily.dev/sources/community"},"commentCount":6,"discussionUrl":"https://daily.dev/posts/automate-your-git-workflow-with-this-simple-bash-script-ivzee8ewb","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":33},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":6}],"keywords":"github,git","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Community Picks","item":"https://daily.dev/sources/community"},{"@type":"ListItem","position":3,"name":"Automate Your Git Workflow with this Simple Bash Script"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/automate-your-git-workflow-with-this-simple-bash-script-ivzee8ewb","comment":[{"@type":"Comment","text":"“git add .” ??? worst git script ever\nuse  aliases","datePublished":"2023-08-27T16:07:34.092Z","dateModified":"2023-08-27T20:51:00.168Z","url":"https://daily.dev/posts/iVZeE8EWb#c-nBWHiyFKu","author":{"@type":"Person","name":"Ian","url":"https://daily.dev/ianneee","image":"https://media.daily.dev/image/upload/s--O0TOmw4y--/f_auto/v1715772965/public/noProfile"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":4}},{"@type":"Comment","text":"This is interesting. I have been using homegrown scripts but never compiled them in one comprehensive one like this. 👏","datePublished":"2023-09-25T15:13:19.480Z","url":"https://daily.dev/posts/iVZeE8EWb#c-N3VGi4Z4V","author":{"@type":"Person","name":"Mirza Bilal","url":"https://daily.dev/mirzabilal","image":"https://media.daily.dev/image/upload/s--j-qFuHZf--/f_auto,q_auto/v1695317089/avatars/avatar_y83geWTVj5rq6lSZDSJtq"}}]}
```

