Skip to content

Commit dff919e

Browse files
committed
Fix conflicts
2 parents 5c87af0 + 2336cdc commit dff919e

2 files changed

Lines changed: 27 additions & 17 deletions

File tree

README.md

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,34 @@
1-
## Smart commit
2-
Create commit with current branch name
1+
# Smart Commit
32

4-
For example:
5-
If your current branch name is ```EF-803```
3+
Create a commit prefixed with the current branch name.
64

7-
```commit "New feature"```
5+
## Installation
86

9-
will produce command
7+
Run this command on terminal.
108

11-
```git commit -m "EF-803: New feature"``` and execute it
9+
```shell
10+
curl https://raw.githubusercontent.com/sbimochan/smart-commit/master/commit -o /usr/local/bin/commit && chmod +x /usr/local/bin/commit
11+
```
12+
13+
## Usage
1214

13-
If your current branch is ```dev or uat or qa or master```
15+
* If your current branch name is `EF-803`
1416

15-
```commit "New feature"```
17+
```shell
18+
$ commit "New feature"
19+
20+
# translates to
21+
git commit -m "EF-803: New feature"
22+
```
1623

17-
will produce default command
24+
* If your current branch is either of `dev`, `uat`, `qa`, `staging` or `master`
1825

19-
```git commit -m "New feature"``` and execute it
26+
```shell
27+
$ commit "New feature"
28+
29+
# translates to
30+
git commit -m "New feature"
31+
```
2032

2133
You can create a file `.ignore` in your directory to add custom branches you want to ignore. Example `.ignore` file:
2234

@@ -26,9 +38,6 @@ sprint-11
2638
new-feature
2739
```
2840

29-
### Installation
30-
Run this command on terminal
31-
32-
```curl https://raw.githubusercontent.com/sbimochan/smart-commit/master/commit -o /usr/local/bin/commit && chmod +x /usr/local/bin/commit```
41+
## License
3342

34-
And restart the terminal
43+
[MIT](LICENSE)

commit

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env bash
2+
23
echo 'Running commit script'
34

45
IGNORED_BRANCHES=("dev" "master" "qa" "uat" "staging")
@@ -29,7 +30,7 @@ done
2930

3031
if [ "$IS_IGNORED" == false ]
3132
then
32-
echo "Commiting with branch name-> $CURRENT_BRANCH"
33+
echo "Commiting with branch name -> $CURRENT_BRANCH"
3334
eval $COMMIT_WITH_BRANCH
3435
else
3536
echo "Commiting with default branch"

0 commit comments

Comments
 (0)