-
Notifications
You must be signed in to change notification settings - Fork 14
/
.bashrc
45 lines (38 loc) · 951 Bytes
/
.bashrc
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
# ---------------- git worflows ---------------- #
# Keep your GitHub forked repo in sync with the original repository with master as the primary branch
function fetchremotems() {
git fetch upstream &&
git merge upstream/master &&
git push origin master
}
# Keep your GitHub forked repo in sync with the original repository with main as the primary branch
function fetchremotemn() {
git fetch upstream &&
git merge upstream/main &&
git push origin main
}
# create new branch and checkout to it
function gcb() {
git checkout -b "${1}"
}
# checkout to a branch
function gc() {
git checkout "${1}"
}
# push changes to another branch
function gbp() {
git push origin "${1}"
}
# add, commit, push changes to github
function gacp() {
git add . &&
git commit -m "${1}" &&
git push
}
# aliases
alias gi='git init'
alias gs='git status'
alias gaa='git add .'
alias gc='git commit -m '
alias gp='git push'
alias gpm='git push origin master'