I have a project which source code is being hosted in SVN. I want to push it to github in order to have a better younglings' commits reviewing capabilities. While also keeping a single folder which is tracked by SVN and git (no patches).
On my local machine i've checked out fresh copy from SVN, initialized git repository and pushed it to remote.
How can other developers initialize a git repository in existing folder so their local repository acts as if it were cloned from a remote?
What have I tried (based on multiple SO answers) is this:
$ cd local_svn_working_copy
$ git init .
$ git add .
$ git commit -m "tmp"
$ git remote add origin git@github...
$ git pull --allow-unrelated-histories
And it all seemed to work fine until I created a new branch (with git checkout -b new-branch), pushed it to remote and started to fill out a merge request. because my merge request included:
- my initial commit "tmp"
- merge of main and origin/main branch
- my local changes which were made in current branch
Which doesn't seem right, because what I expected to see in only my local changes. What is the proper strategy?