我用的是电子反应样板。它通过克隆回购程序来指示安装:
git clone --depth 1 --single-branch https://github.com/electron-react-boilerplate/electron-react-boilerplate.git your-project-name我希望能够修改这个本地git,并将它存储在我自己的存储库中。为此,我创建了一个新的存储库:
git remote add my_remote_repo https://github.com/paragbaxi/my_remote_repo我在远程回购中存储的本地分支中跟踪这些更改。
git checkout -b local_branch
git commit -a -m 'Initial commit'
git push my_remote_repo local_branch我如何从原点(电子反应-样板)中提取变化来安全地合并它们?
选项1:通过创建本地分支并进行合并?
git结帐branch_to_pull_from_erb -b
git合并原点
备选方案2:通过对原产地的拉动?
git拉https://github.com/electron-react-boilerplate/electron-react-boilerplate.git
其他选择?
发布于 2020-06-26 19:43:57
你可以这样做:
git checkout -b some_remote_branchname
git pull origin some_remote_branchname
然后,您可以合并some_remote_branchname和local_branch。
或者,如果要将远程分支拉到具有不同名称的本地brach中,可以按以下方式进行操作:
git pull origin some_remote_branchname:some_local_branchname
https://stackoverflow.com/questions/62600428
复制相似问题