auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [a new branch?]


From: Uwe Brauer
Subject: Re: [a new branch?]
Date: Sun, 28 Feb 2021 21:35:53 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>>> "TH" == Tassilo Horn <tsdh@gnu.org> writes:

> Uwe Brauer <oub@mat.ucm.es> 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.


Well hg strip, get rid of a commit (not deleting it but well stripping
it), oh I just checked again the  git mercurial Rosetta stone 

The hg command would be 
hg revert -a

Ok git checkout does not to the same as hg chekcout

>> 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.

Why git fetch and not pull?

In my understanding only gets meta information but does not necessarily
download data for example in 
https://www.freecodecamp.org/news/git-fetch-vs-pull/#:~:text=git%20fetch%20is%20the%20command,changes%20from%20the%20remote%20repository.

> 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.

 So maybe 

 git checkout -b  tex-build-only  remotes/origin/tex-build-only

Might work

Anyhow we shouldn't turn this out in a discussion about git vs mercurial

>> 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.

Well that's how I maintain (with others the matlab emacs repositories).

I think I will try to stick to hg-git, and if I encounter problems I
might come back. I just find git to confusing to work comfortably with it.


Uwe 

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]