git - 奇怪的分支合并错误,我不知道如何解决

Gen*_*nik 14 git git-merge

当我git status,我收到此错误消息:

# On branch master
# Your branch and 'origin/master' have diverged,
# and have 1 and 2 different commits each, respectively.
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#   .gitignore
nothing added to commit but untracked files present (use "git add" to track)
Run Code Online (Sandbox Code Playgroud)

所以我不能拉或推.当我拉我得到这个:

macoss-MacBook-Pro-10:Marketing owner12$ git pull origin master
Password for 'https://genadinik@bitbucket.org': 
From https://bitbucket.org/genadinik/marketing
 * branch            master     -> FETCH_HEAD
error: The following untracked working tree files would be overwritten by merge:
    .DS_Store
Please move or remove them before you can merge.
Aborting
Run Code Online (Sandbox Code Playgroud)

我该怎么做才能解决这个问题?谢谢!

war*_*enm 50

rm .DS_Store
git add -A
git commit -m "Added .gitignore file"
Run Code Online (Sandbox Code Playgroud)

您还希望明确地添加.DS_Store到您的内容中,.gitignore以便.DS_Store将来不可避免地创建时,它不会妨碍您的提交.