https://github.com/hashfx/git-script
shell script to ease git experience
https://github.com/hashfx/git-script
Last synced: over 1 year ago
JSON representation
shell script to ease git experience
- Host: GitHub
- URL: https://github.com/hashfx/git-script
- Owner: hashfx
- Created: 2025-03-17T12:14:47.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-17T12:24:36.000Z (over 1 year ago)
- Last Synced: 2025-03-17T13:31:19.182Z (over 1 year ago)
- Language: Shell
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Scripts to enhance UX of Git Script
+ create script file: ```nano gitac```
+ add the code of gitac.sh
+ save file and give execution permisison ```chmod +x gitac```
+ (optional) move it to a directory in your $PATH: ```mv gitac /usr/local/bin/```
gitac
alias of: git add filename1 filename2 etc && git commit -m ""
#!/bin/bash
# Get the last argument as the commit message
commit_msg="${@: -1}"
# Get all other arguments except the last one (file names)
files=("${@:1:$#-1}")
# Add the files to staging
git add "${files[@]}"
# Commit with the provided message
git commit -m "$commit_msg"