tags:

views:

2096

answers:

2

In another question it was recommend that I try resetting a remote tracking branch to an earlier commit and performing an import a second time. I can't figure out how to do that! I can reset master, but not the branch master is tracking, cvs/master.

If I check out cvs/master, I'm not on a branch, so git-reset basically has no effect.

How do I change the commit to which cvs/master (or any arbitrary remote tracking branch) refers?

+2  A: 

Did you try this: create a local branch that targets that remote branch, reset or rebase this local branch to your needs, push the local branch with -f option (force)?

Ariya Hidayat
In this case the original question is talking about remote branches which were created with git-cvsimport which don't have a real upstream git repo to force update.
Brian Phillips
+2  A: 

git-cvsimport remote branches are kind of faked out so I think you can just edit the appropriate file in your .git directory (.git/refs/remotes/cvs/master in this case) and put the appropriate commit I'd in the file. I'm not sure if this will fix the problem in your other question though...

Brian Phillips