[GitHub] 1. Configuring Git
1.2 Configuring Git
Here's a list of some configuration options we just went over with one part of the git command missing. Make sure your own git configuration is setup the way you want it by selecting any of these commands you find useful.
To check your current username: $ git config --global user.name To set your username: $ git config --global user.name "Beatrix Kiddo" To check your email: $ git config --global user.email To set your email: $ git config --global user.email beatrix@deadly-vipers.com To limit pushes to your current branch: $ git config --global push.default simple To default all new branches to fetch and rebase - not merge: $ git config --global branch.autosetuprebase always To record any merge conflict resolutions and reuse them automatically: $ git config --global rerere.enabled true To colorize git’s output for increased readability: $ git config --global color.ui true To create a git s alias: $ git config --global alias.s "status -s" To create a git lg alias: $ git config --global alias.lg "log --oneline --decorate --all --graph" To configure line endings correctly on Linux/Mac: $ git config --global core.autocrlf input To configure line endings correctly on Windows: $ git config --global core.autocrlf true
Alisa Setting:
git config --global alias.s "status -s" // git s git config --global alias.lg "log --online --decorate --all --graph" // git lg
1.4 Fork
Fork the repo which You DONNOT have premittion to push you commit.
Basic, you copy the repo to your local and then push commit to your forked repo.
1.5 Create a Pull Request:
If want to push the changes to the owner's repo, then you can send a pull request.
Owner will review the pull request, if he accepts, then the changes will be updated.
If he doesn't approve it, he will send back the msg, we do the change accordingly, then push changes to our repo again.
At the same time, it will automaticlly send the request to the own's repo, notify him we have done the changes.
1.8 Add Upstream
We really want to contribute to the "deadlyvipers/dojo_rules" repository long term. In the console, add this repo, https://github.com/deadlyvipers/dojo_rules.git
, as a remote named upstream
.
$ git remote add upstream https://github.com/deadlyvipers/dojo_rules.git
1.9 Staying Up To Date
Now that we have the remote added as upstream
, go ahead and merge all changes on from the master branch of the "deadlyvipers/dojo_rules" repository into your local master branch.
$ git remote add upstream https://github.com/deadlyvipers/dojo_rules.git $ git fetch upstream $ git merge upstream/master master
相关文章
- Windows下解决github push failed (remote: Permission to userA/XXXX.git denied to userB.) 上传gitHub失败报错
- [GIT] Git 工作流程(Git flow, Github flow flow, Git lab flow)
- github proxy
- Git、Github、Gitlab与Gitee之间的关系
- Github上600多个iOS开源项目分类及介绍
- Github上优秀的Objective-C项目简介
- 一招解决GitHub致命的下载速度(GitHub下载速度慢怎么办)
- [Github] Create a GitHub PR Template
- [Git] git Ignore a File that has Already been Committed and Pushed
- [Practical Git] Show who changed a line last with git blame
- [Practical Git] Format commit history with git log arguments
- github_源码
- git之sourceTree使用github和码云的代码小结
- 【学习总结】Git学习-参考廖雪峰老师教程八-使用GitHub
- [Git] Use and Compare the Different git Reset Options: --hard, --soft, and --mixed
- 用nodejs读取github上某仓库的某条issue明细
- 两天狂揽 4k+ Star,抢茅台 Python 脚本霸榜 GitHub
- Github 上最大的开源算法库,还能学机器学习
- github更新项目中的子模块
- Git使用操作指南和GitHub
- 【Github教程】史上最全github用法:github入门到精通
- [Git & GitHub] 变更Git Bash的默认路径
- Git知识总览(四) git分支管理之rebase 以及 cherry-pick相关操作
- GitHub 热门:各大网站的 Python 爬虫登录汇总
- prometheus-operator+oauth-proxy+github添加鉴权