Sync local branch with the remote branch in git repository
This question already has an answer here:
You have to commit first:
git commit -a -m "commit message"
after that you can pull from remote
You have copies of files that were added in the remote branch but are not being tracked in your local. Delete or move those files then you will be able to pull.
When you do git status
there will be a section of listed as Untracked Files. You can do git stash -u
and it will add all the untracked files to a stash. Then you will be able to pull the changes without a problem.
上一篇: 如何获取整个git存储库
下一篇: 将本地分支与git存储库中的远程分支同步