git config
git global config
# git global config
$ git config
$ git config --list --show-origin
$ git config --global user.name "xgqfrms"
$ git config --global user.email "xgqfrms@xgqfrms.xyz"
# $ git config --global core.editor emacs
$ git config --global core.editor vscode
$ git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"
vscode
$ code ~/.gitconfig
$ code .git/config
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[user]
name = xgqfrms
email = xgqfrms@xgqfrms.xyz
[core]
excludesfile = /Users/xgqfrms-mbp/.gitignore_global
[difftool "sourcetree"]
cmd = opendiff "$LOCAL" "$REMOTE"
path =
[mergetool "sourcetree"]
cmd = /Applications/Sourcetree.app/Contents/Resources/opendiff-w.sh "$LOCAL" "$REMOTE" -ancestor "$BASE" -merge "$MERGED"
trustExitCode = true
[commit]
template = /Users/xgqfrms-mbp/.stCommitMsg
$ git config --global user.name "xgqfrms"
$ git config --global user.email "xgqfrms@xgqfrms.xyz"
$ git config user.name "xgqfrms"
$ git config user.email "xgqfrms@xgqfrms.xyz"
git local config
.git/config
# local config
$ git config --local -l
# edit
$ git config --local -e
$ cd .git
$ code .
$ git config user.name "your-user-name"
$ git config user.email "your-email-addr"
$ git config user.name "webgeeker"
$ git config user.email "webgeeker@webgeeker.xyz"
git
https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-config
https://git-scm.com/docs/git-config
github
https://help.github.com/en/articles/setting-your-username-in-git
https://help.github.com/en/articles/set-up-git
git cconfig
https://www.shellhacks.com/git-config-username-password-store-credentials/
filename & lowercase
http://www.ruanyifeng.com/blog/2017/02/filename-should-be-lowercase.html
git cli & create remote branch
# Create a new branch and check it out
$ git checkout -b <branch-name>
# The remote branch is automatically created when you push it to the remote server.
# <remote-name> is typically origin
$ git push <remote-name> <branch-name>
$ git push <remote-name> <local-branch-name>:<remote-branch-name>
$ git push --set-upstream <remote-name> <local-branch-name>
# create a new branch & check it out
$ git checkout -b test
# local & remote with the same name
$ git push origin test
# local & remote with a different name
$ git push origin test:dev
# ❌ delete remote brach bug, if only `:<remote-branch-name>`
$ git push origin :dev
https://tecadmin.net/how-to-create-a-branch-in-remote-git-repository/
https://stackoverflow.com/questions/1519006/how-do-you-create-a-remote-git-branch
refs
©xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!