Skip to content
This repository was archived by the owner on Aug 16, 2022. It is now read-only.

Commit cb5dfcd

Browse files
committed
docs: update sample .gitconfig
1 parent 569adc4 commit cb5dfcd

2 files changed

Lines changed: 30 additions & 27 deletions

File tree

.github/.gitconfig

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
# Git Configuration
22
# See: http://michaelwales.com/articles/make-gitconfig-work-for-you/
33

4-
# General Aliases
4+
# Git Helpers
55
[alias]
6-
# Git Add & Commit - All in one step
6+
# Git add and commit - all in one step
77
ac = "!f() { git add .; git cm \"$@\"; }; f"
88

99
# Add new git remote
1010
ar = "!f() { git remote add \"$0\" \"$1\"; }; f"
1111

12-
# Checkout and push new branch to origin
13-
b = "!f() { git checkout -b \"$@\"; git puo \"$@\"; }; f"
12+
# Execute git branch command
13+
b = "!f() { git branch $@; }; f"
1414

1515
# Delete a branch locally
16-
bdel= "!f() { git branch -D $@; }; f"
16+
bdel= "!f() { git b -D $@; }; f"
1717

1818
# Delete a branch remotely
1919
bdelr= "!f() { git push origin --delete $@ --no-verify; }; f"
2020

21-
# Git Commit with message
22-
cm = "!f() { git commit -m \"$@\"; }; f"
23-
2421
# Checkout branch
2522
ch = "!f() { git checkout $@; }; f"
2623

24+
# Checkout and push new branch to origin
25+
chb = "!f() { git ch -b \"$@\"; git puo \"$@\"; }; f"
26+
2727
# Checkout branch and pull latest version
2828
chp = "!f() { git ch $@; git pull; }; f"
2929

30-
# Create new local repo, perform initial commit, and push to Github
31-
launch = "!f() { git local; git rao $@; git puo next; }; f"
30+
# Commit with message
31+
cm = "!f() { git commit -m \"$@\"; }; f"
3232

33-
# Start a new local repository and perform initial commit
34-
local = "!f() { git init; git add -A; git chore \"initial commit\"; git branch -M next; }; f"
33+
# Create new local repo, perform initial commit, and push
34+
launch = "!f() { git init; git chore \"first commit\"; git b -M next; git rao $1; git puo next; }; f"
3535

3636
# Tell Git to start tracking branch and push to origin
3737
puo = "!f() { git push -u origin $@ --no-verify; }; f"
@@ -40,7 +40,10 @@ puo = "!f() { git push -u origin $@ --no-verify; }; f"
4040
rao = "!f() { git remote add origin $@; }; f"
4141

4242
# Remove local .git directory
43-
restart = "!f() { rm -rf .git; echo \"Removed .git directory.\"; }; f"
43+
restart = "!f() { rm -rf .git; echo \"removed .git directory.\"; }; f"
44+
45+
# Undo last commit
46+
ulc = "!f() { git reset HEAD~1 --soft; }; f"
4447

4548
# Conventional Commits
4649
# See: https://www.conventionalcommits.org/
@@ -84,20 +87,20 @@ wip = "!f() { git ac \"wip: $@\"; }; f"
8487

8588
# Branch Naming Conventions Aliases
8689
[alias]
87-
# Create a new feature branch and push upstream
88-
feat = "!f() { git b feat/$@; }; f"
89-
9090
# Create a new bugfix branch and push upstream
91-
bugfix = "!f() { git b bugfix/$@; }; f"
91+
chbb = "!f() { git chb bugfix/$@; }; f"
9292

9393
# Create a new hotfix branch and push upstream
94-
hotfix = "!f() { git b hotfix/$@; }; f"
94+
chbh = "!f() { git chb hotfix/$@; }; f"
95+
96+
# Create a new feature branch and push upstream
97+
chbf = "!f() { git chb feat/$@; }; f"
9598

9699
# Create a new release branch and push upstream
97-
release = "!f() { git b release/$@; }; f"
100+
chbr = "!f() { git chb release/$@; }; f"
98101

99102
# Create a new support branch and push upstream
100-
support = "!f() { git b support/$@; }; f"
103+
chbs = "!f() { git chb support/$@; }; f"
101104

102105
# Helper Aliases
103106
[alias]
@@ -122,8 +125,8 @@ pnv = "!f() { git push --no-verify; }; f"
122125
autocrlf = input
123126
ignorecase = false
124127

125-
[credential]
126-
helper = osxkeychain
128+
[init]
129+
defaultBranch = next
127130

128131
[gitflow "prefix"]
129132
feature = feat/
@@ -132,14 +135,14 @@ release = release/
132135
support = support/
133136
versiontag = v
134137

138+
[pull]
139+
rebase = true
140+
135141
[url "git@bitbucket.org:"]
136142
insteadOf = bb:
137143

138-
[url "https://github.com/"]
144+
[url "git@github.com:"]
139145
insteadOf = gh:
140146

141147
[url "https://gist.github.com/"]
142148
insteadOf = gist:
143-
144-
[init]
145-
defaultBranch = next

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ When creating a new branch, the name should match the following format:
158158
For example:
159159

160160
```zsh
161-
git feat P011-1-repository-setup
161+
git chbf P011-1-repository-setup
162162
```
163163

164164
will create a new branch titled `feat/P011-1-repository-setup`.

0 commit comments

Comments
 (0)