Based on previous suggestions, this is the solution I came across:
1
:
git add --patch <files> # record every change to move to master
git commit
git stash
git checkout master
git cherry-pick <commitid>
, .
git checkout <branch>
git rebase master
:
git rebase --skip
, . git merge - .
2
, :
git add --patch <files> # record every change to move to master
:
git stash --keep-index
git checkout master -m
git commit
, :
git checkout <branchname>
git rebase master
git stash apply
3,
( SVN ), :
mkdir ../newrepos
cd ../newrepos
git init
git remote add origin /path/to/your/repository
git fetch master:remotes/origin/master # fetch remote master to local remotes/origin/master
git checkout -t origin/master # make new "master" branch, link to remote, checkout.
git commit
git push origin master # inject the change in the original repository.
, git clone .
git diff > to-master.patch git apply to-master.patch. reset , , .
, . , checkout -m.