[GitHub] LEVEL 2 Single Repository Workflows
2.2 Pull Requests Within a Repository
We're going to "come to you" and collaborate on your fork of the "dojo_rules" repository. To start out, we'll try doing some work on a local branch with a pull request.
1. Add a collaborators. "Settings --> Collaborators"
2. Create a branch of the "dojo_rules" repository locally and name it "deadly_skills". Push it up to GitHub. At this point, the branch will have the same content as the master branch.
$git branch -b deadly_skills
[deadly_skills] $git push origin deadly_skills
3. On your "deadly_skills" branch, open up your introduction file and modify it to include a list of your deadly skills (for example: Git, JavaScript, Ruby). Since this file is Markdown, you can specify these one per line starting the line with a *
to make them into a list.
Add, commit and push your changes up to GitHub. Be sure to push to the remote branch with the same name as your local branch – deadly_skills
.
dojo_rules$ git commit -am "Added deadly skills" dojo_rules (deadly_skills)$ git push origin deadly_skills
4. Create a pull request from your branch to your master. When you create a pull request by default it'll go from your master branch back to "deadlyvipers/dojo_rules". In this case though, we want the pull request to go from "dojo_rules/deadly_skills" to "dojo_rules/master" – both in your repository.
To do this, create a pull request and click "Edit" at the top. Make sure the base is your master and the "compare" is your "deadly_skills" branch. This should show all of the changes you made on your branch.
3 Merge the pull request.
Closing Pull Requests by Merging
Start by getting all changes on GitHub on your master branch: dojo_rules (deadly_skills)$ git checkout master dojo_rules (master)$ git pull Next, merge in the using the no-ff option. dojo_rules (master)$ git merge --no-ff deadly_skills -m "Merging in deadly_skills" Force push it to GitHub: dojo_rules (deadly_skills)$ git push
git checkout master git pull git merge --no-ff deadly_skills git push
【推荐】国内首个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工具