-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.zshrc.pre-oh-my-zsh
More file actions
52 lines (38 loc) · 2.42 KB
/
Copy path.zshrc.pre-oh-my-zsh
File metadata and controls
52 lines (38 loc) · 2.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="robbyrobins"
CASE_SENSITIVE="true"
plugins=(
git
docker
docker-compose
zsh-autosuggestions
zsh-completions
)
source $ZSH/oh-my-zsh.sh
# Preferred editor for local and remote sessions
# Aliases
## git aliases
alias gs="git status"
alias grb="git rebase origin/master"
alias gp="git push origin"
alias gpf="git push --force origin"
alias gco="git checkout"
alias gcm="git commit -m"
git_create_branch() {
local branch_name="$1"
if [ -z "$branch_name" ]; then
echo "Usage: create_git_branch <branch_name>"
return 1
fi
git checkout -b "$branch_name"
git push --set-upstream origin "$branch_name"
}
alias gcb="git_create_branch"
git_push_current_branch() {
# Get the current branch name
branch_name=$(git rev-parse --abbrev-ref HEAD)
# Push the current branch with the -u flag
git push -u origin "$branch_name"
}
alias gpuo="git_push_current_branch"
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh