Uwe Brauer <[email protected]> writes: Hi Uwe,
> >> Indeed, one would have to run `git reset ...`. I preferred to rebase > >> so that it is easier for you as AUCTeX maintainers to merge changes > >> and since no one was using my repo besides me. > > > Yes, I prefer this workflow, too. > > I am confused, > > If I pull do I have then to run > > git reset --hard origin/branch > > ? No, instead of "git pull" you'd do git fetch && git reset --hard origin/tex-build-only > In my understanding git reset --hard is basically the same as hg strip > -r commit I don't know what "hg strip -r commit" does but "git reset --hard origin/branch" is the way to tell git to reset the current branch to exactly what's there on branch on the remote origin. > Wouldn't do a simple > > git checkout remotes/origin/tex-build-only > > the same? Yes, that would also do (assuming you run "git fetch" before), I think. The difference is that the "reset" says to make your local tex-build-only identical to the remote one whereas the latter checks out the remote branch itself. As you've already seen, that puts you in a detached head state (meaning you cannot make commits there). As a mere user who just wants to compile and run the code, that's also ok. > That is really confusing, there is a branch and I cannot check it out, > without getting a warning. [1] When you checkout a branch remote/branch (e.g. origin/tex-build-only), you checkout the thing that tracks the branch on the remote and must not be altered. > I presume this is fine for compilation, but sigh, I think I stick with > hg and hg-git > > Then a simple > > hg up tex-build-only I wouldn't bet on that but we'll see. Bye, Tassilo
