How to get the latest SVN HEAD in git-svn?
git-svn and I’d like to update to the latest SVN HEAD.
When I type
git pull it says:
- Code organization using several git repositories with a QT project
- github fork confusion
- Git: Get updates from repository
- Shared Library in repository with visual studio
- No Media file in my local repository on Source Tree from BitBucket
- Add subproject as usual folder to repository
fatal: No remote repository specified. Please, specify either a URL or a remote name from which new revisions should be fetched.
I read here that I should do something like:
git checkout -b real-trunk remotes/trunk
But I don’t understand the command. What’s
remote-trunk? In any case,
git gives an error:
fatal: git checkout: updating paths is incompatible with switching branches. Did you intend to checkout 'remotes/trunk' which can not be resolved as commit?
Here is my
$ cat .git/config [core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [svn-remote "svn"] url = http://name.xyz.com/svn/trunk/project fetch = :refs/remotes/git-svn
Also, can anyone tell me how to revert all changes that I made in my git checkout? I want to be back at the fresh SVN HEAD version.
One Solution collect form web for “How to get the latest SVN HEAD in git-svn?”
For updating instead of “git pull”:
git svn rebase
I guess you already have refs/heads/master corresponding your refs/remotes/git-svn, so work with it, you need no “real-trunk”.
“git checkout” doesn’t perform any changes, it just changes your current branch. You may change your current branch back but using “git checkout your_previous_commit_or_branch”.
“git checkout -b branchname” creates a new branch. To delete a branch use ” git branch -D branchname”.