我收到一个拉取请求,我想通过命令行批准它(即,不使用浏览器和GUI登录到Github)。此PR对分支进行更改。
这是我尝试的:
# First I go to the correct branch:
git checkout branch-to-be-modified
# Then I pull the changes made by the person who's contributing with the PR:
git pull https://github.com/my-contributor/code.git his-branch
# I then run `git status`, but it shows me nothing
git status
# Outputs:
# > On branch branch-to-be-modified
# > nothing to commit, working tree clean
如何通过命令行接受Github拉取请求?
我还需要做git push origin branch-to-be-modified
什么?
这应该很容易,但是我找不到此信息。非常感谢您提供的线索
您应该要求GitHub合并上述请求请求:那将是“接受”请求。
您可以使用官方GitHub客户端从命令行进行操作gh
看到 gh pr merge
gh pr merge <number>
但是,假设你没有登录第一(例如,使用令牌喜欢你的PAT:gh auth login --with-token < mytoken.txt
)。
同样,从命令行开始,无需直接使用GitHub Web。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句