从主分支更新文件到功能分支
我最近开始学习git。 我有两个创建了两个分支:“主”分支和“分支1”。
我目前正在研究Branch1,并在那里创建了一些新文件。 另外,我也在主分支上也创建了一些新的,不同的文件。
我的目标是使用主分支中新创建的文件更新我的分支。
我已经尝试过
git fetch origin
git checkout branch1
git merge master
,但它显示了
Already up to date
I have recently started learning git.
I have two created two branches, 'master' branch and 'branch1'.
I am working on branch1 currently and have created some new files there.
Also, I have created some new, different files on master branch as well.
My goal is to update my branch with the newly created files in the master branch.
I have tried
git fetch origin
git checkout branch1
git merge master
but it shows
Already up to date
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
git基本上仅对 Consits 感兴趣。如果您在主人公上创建一个功能分支,但在您在该分支上时不会制作 commit ,则该功能分支没有将其与主人区分开来的工作。基本上,特征分支是主人。
要做工作,编辑add-commit。 现在 git可以使用一些东西。
Git is basically interested only in commits. If you create a feature branch off of master but you don't make a commit while you're on that branch, the feature branch has no work on it that distinguishes it from master. Basically, the feature branch is master.
To do work, edit-add-commit. Now Git will have something to work with.