I'm using git-svn
and I'd like to update to the latest SVN HEAD.
When I type git pull
it says:
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 .git/config
:
$ 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.
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".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With