Skip to content

Commit cb42e95

Browse files
committed
Updated config command, added readme
1 parent f6fc6a7 commit cb42e95

File tree

2 files changed

+40
-5
lines changed

2 files changed

+40
-5
lines changed

README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,29 @@
1-
# git-extras
1+
# Custom git commands
2+
3+
## Requirements
4+
5+
* make utility
6+
* sudo access to be able to complete the installation
7+
8+
## Installation
9+
10+
* Clone the repository to some folder
11+
* To install/update git extra commands just run
12+
13+
```bash
14+
make install
15+
```
16+
17+
## Commands reference
18+
19+
| Command | Description |
20+
|-------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|
21+
| `git browse` | Opens remote repository URL in browser. Taken from [git-extras](https://github.com/tj/git-extras). |
22+
| `git jc-config` | Configures repository with default global filemode (or 'false' by default) and push strategy. |
23+
| `git jc-gitflow` | Creates if not exists `develop`/`release` branches or sync them. |
24+
| `git jc-feature <shortDescription>` | Defines git branching flow ("gitflow" or "feature branch") and creates Feature branch from the right branch (develop or main/master) |
25+
| `git jc-hotfix <shortDescription>` | Creates Hotfix branch from `main`/`master` branch. |
26+
| `git lk-feature <shortDescription>` | Creates Feature branch from `release`. |
27+
| `git lk-epic <shortDescription>` | Creates Epic branch from `release`. |
28+
| `git lk-hotfix <shortDescription>` | Creates Hotfix branch from `main`/`master` branch. |
29+

bin/git-jc-config

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,17 @@
22

33
echo 'Updating git configurations...';
44

5-
git config core.filemode false;
6-
echo ' ignored filemode changes';
5+
# get global defined config
6+
filemode=$(git config --global core.filemode)
7+
# set default as 'false' if not defined.
8+
if [ -z "${filemode}" ]
9+
then
10+
filemode='false'
11+
fi;
12+
git config core.filemode ${filemode};
13+
echo " set tracking filemode changes to [${filemode}]";
714

815
git config push.default simple;
9-
echo ' set simple push strategy';
16+
echo " set simple push strategy";
1017

11-
echo 'Done.';
18+
echo "Done.";

0 commit comments

Comments
 (0)