https://github.com/zeyu-li/git_initer
A Shell script that git inits, adds, commits when run
https://github.com/zeyu-li/git_initer
git git-automation shell shell-script
Last synced: about 1 month ago
JSON representation
A Shell script that git inits, adds, commits when run
- Host: GitHub
- URL: https://github.com/zeyu-li/git_initer
- Owner: Zeyu-Li
- Created: 2020-03-04T18:46:31.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-05T00:52:33.000Z (about 5 years ago)
- Last Synced: 2025-01-22T22:09:29.981Z (3 months ago)
- Topics: git, git-automation, shell, shell-script
- Language: Shell
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Git Initer
This Shell Script command inits, adds, and commits the current directory given a first commit message
## Use
To use, simple put:
```powershell
bash cmt.sh #some commit messageOR
bash cmt #some commit message
OR
./cmt.sh
```Code:
```shell
#!/bin/bash# gets args
commit_message="$1"# checks if null, if so, message will be: "first init"
# else, message will be arg passed in
if [[ ! $commit_message ]]
then
message="first init"
else
message=$commit_message
fi(git init && git add . && git commit -m \""$message"\")
```