Hello,

Please consider the attached steps which create an SVN repo and setup git 
to track it.

1. Why do "local-newbranch" and "master" not share a common ancestor?

2. How do I make them share a common ancestor?

3. Assuming (2) is possible, will I be able to rebase "master" changes onto 
"local-newbranch"

4. Assuming (3) is possible, will I be able to dcommit "local-newbranch"?

Thank you,

Chris

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/git-users/-/en82rDDjUz8J.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.

# Init and create SVN repo
ROOT=/home/cstankevitz/Delete
cd ${ROOT}
rm -rf repo.git/ repo.svn svn-repo-checkout/
svnadmin create repo.svn
svn checkout file://${ROOT}/repo.svn svn-repo-checkout
cd ${ROOT}/svn-repo-checkout/
mkdir trunk
echo "line 1" > trunk/a.txt
svn add trunk/ branches/
svn commit -m "Initial commit"
echo "line 2" >> trunk/a.txt
svn commit -m "Added a second line"

# Create a GIT repo that follows the SVN trunk
cd ${ROOT}
git svn clone file://${ROOT}/repo.svn/ --trunk=file://${ROOT}/repo.svn/trunk/ 
repo.git

# Create the SVN branch
cd ${ROOT}/svn-repo-checkout
svn cp --parents file://${ROOT}/repo.svn/trunk/ 
file://${ROOT}/repo.svn/branches/newbranch -m "Created a branch newbranch"
svn up

# Update the GIT repo to follow the SVN branch
cd ${ROOT}/repo.git
git config --add svn-remote.newbranch.url 
file://${ROOT}/repo.svn/branches/newbranch
git config --add svn-remote.newbranch.fetch :refs/remotes/newbranch
git svn fetch newbranch
git checkout -b local-newbranch -t newbranch
git svn rebase newbranch
gitk --all

Reply via email to