Sai*_*ran 5 git synchronization git-pull
我的 github 帐户中有一个 fork,我将这个 fork 克隆到了我的本地计算机。现在我做了一些提交,并将其推送到origin. 然后,我readme.md直接在 GitHub 中更新了fork 中的文件,而不是在本地 clone 中。我做了一个名为Updated readme.md file.
现在我想将它与我的本地计算机同步。所以我跑了git pull。这给了我错误:
Cannot pull with rebase: You have unstaged changes.
Please commit or stash them.
Run Code Online (Sandbox Code Playgroud)
最后一次提交后,我修改了本地计算机上的 2 个文件。但我不再想要这些改变。所以,我想删除对这两个文件所做的任何更改,并与origin.
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: scripts/filename.js
Untracked files:
(use "git add <file>..." to include in what will be committed)
scripts/anotherfile.js
no changes added to commit (use "git add" and/or "git commit -a")
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
264 次 |
| 最近记录: |