I have a project not by git and want to merge it with other one under git. Wat will be steps to do this?
git init
git remote add origin git@bitbucket.org:projectname/reponame.git
git pull origin master
And then git wants me to commit anything to create local master branch.
git add something
git commit -m 'Initial'
But I want do this like a new branch, ok make new branch
git branch newbranch
git checkout newbranch
So what next? I want keep my master and merge it to newbranch. When i try pull again i got this:
git pull origin master
From bitbucket.org:projectname/reponame
* branch master -> FETCH_HEAD
error: The following untracked working tree files would be overwritten by merge:
.gitignore
.htaccess
...
Please move or remove them before you can merge.
Aborting
How to tell git - ok do it! At the end I want to have two branches: master (as it was at origin) and merged newbranch (my existed code + origin/master)