[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
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具