I have some new files that I didn't add to git yet; I'm not sure I will, I'm still undecided. But I want to get whatever is latest in the server.
However, when I do a git pull
I get the error error: Your local changes to 'XXXX' would be overwritten by merge. Aborting.
, where XXXX is my new file.
How can I tell git to download the changes and new files from the server, tell me about possible conflicts between what's on the server and my local modifications to files already in the repository, while at the same time not aborting because I have new files locally?
I don't want to add them to .gitignore, as I have this situation frequently and I don't want to be adding and removing files from .gitignore all the time for silly stuff... especially because I don't want to run the risk of forgetting about a certain file that in the end I would decide that it has to be added to the repository, so I want git status
to keep telling me about them. Sometimes I run git status -uno
when I want to ignore new files, and then sometimes I run git status
to see what's new and decide what to keep and what to discard. But I couldn't find an equivalent option for git pull
.
My attempts at googling take me to people who want to overwrite their local changes with what's on the repository, or other similar scenarios. :( After reading the documentation I found that I can do a git fetch
to bring my local repository up to date, that didn't yield any errors, but it also didn't bring the changes to my working copy. I can't figure out the next step after that. :-/ In any case, a pull
with no errors would be ideal...