Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 64b698f

Browse files
committed
📦 NEW: zshrc file
1 parent c470bd8 commit 64b698f

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

‎.zshrc

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# ---------------- git worflows ---------------- #
2+
3+
# Keep your GitHub forked repo in sync with the original repository with master as the primary branch
4+
function fetchremotems() {
5+
git fetch upstream &&
6+
git merge upstream/master &&
7+
git push origin master
8+
}
9+
10+
# Keep your GitHub forked repo in sync with the original repository with main as the primary branch
11+
function fetchremotemn() {
12+
git fetch upstream &&
13+
git merge upstream/main &&
14+
git push origin main
15+
}
16+
17+
# create new branch and checkout to it
18+
function gcb() {
19+
git checkout -b "${1}"
20+
}
21+
22+
# checkout to a branch
23+
function gc() {
24+
git checkout "${1}"
25+
}
26+
27+
# push changes to another branch
28+
function gbp() {
29+
git push origin "${1}"
30+
}
31+
32+
# add, commit, push changes to github
33+
function gacp() {
34+
git add . &&
35+
git commit -m "${1}" &&
36+
git push
37+
}
38+
39+
# aliases
40+
alias gi='git init'
41+
alias gs='git status'
42+
alias gaa='git add .'
43+
alias gc='git commit -m '
44+
alias gp='git push'
45+
alias gpm='git push origin master'

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /