I have a folder with VS Solution with few projects and so on. I've created a GitHub repository and uploaded the contents of that directory via the web interface.
Now, changes have been made to my projects, and I want to start pushing those to my github repository. So I use git init
, than stage and commit files.
But I can't push because "Updates were rejected because the remote contains work that you do not have locally."
But I can't pull either because
git pull RemoteName master
// refusing to merge unrelated histories
So I try to fetch
and merge
in order to use --allow-unrelated-histories
with merge as suggested somewhere, but fail miserably because of not understanding how merge really works while cursing I didn't red git manual after chapter 1 :)
Seriously how to proceed from here?
git fetch RemoteName
//Ok
git merge RemoteName
//No remote for the current branch.
git merge RemoteName master
//merge: RemoteName - not something we can merge
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…