以什么顺序执行 git 命令以从暂存中提取更改、与功能合并并推送到远程?
In what order to execute git commands to pull changes from staging, merge with feature, and push to remote?
我有一个名为 feature
的功能分支和一个名为 staging.
的临时分支 如何在推送之前获取 staging
的最新更新并将其合并到 feature
feature
到 Github?
我会 运行 像这样:
git fetch --all (update your git's knowledge of remote stuff)
git checkout feature ('tags' your folder as code belonging to feature branch and downloading the code)
git pull origin staging (downloads staging code and but keeps it as code belonging to feature branch)
git add . (marks all code changes for commit)
git commit -m'my awesome code changes' ( commits)
git push origin feature (Pushing all your changes to feature branch)
好吧,在 pull 之后你很可能需要解决所有的冲突。但这超出了范围:)
但在 运行 来自互联网的人的任何命令之前...做一个保留副本 :)
我有一个名为 feature
的功能分支和一个名为 staging.
的临时分支 如何在推送之前获取 staging
的最新更新并将其合并到 feature
feature
到 Github?
我会 运行 像这样:
git fetch --all (update your git's knowledge of remote stuff)
git checkout feature ('tags' your folder as code belonging to feature branch and downloading the code)
git pull origin staging (downloads staging code and but keeps it as code belonging to feature branch)
git add . (marks all code changes for commit)
git commit -m'my awesome code changes' ( commits)
git push origin feature (Pushing all your changes to feature branch)
好吧,在 pull 之后你很可能需要解决所有的冲突。但这超出了范围:)
但在 运行 来自互联网的人的任何命令之前...做一个保留副本 :)