[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
smime.p7s
Description: S/MIME cryptographic signature
- Re: Output to directory patch, (continued)
- Re: Output to directory patch, Ikumi Keita, 2021/02/25
- [a new branch?] (was: Output to directory patch), Uwe Brauer, 2021/02/25
- Re: [a new branch?] (was: Output to directory patch), Tassilo Horn, 2021/02/25
- Re: [a new branch?] (was: Output to directory patch), Al Haji-Ali, 2021/02/25
- Re: [a new branch?] (was: Output to directory patch), Tassilo Horn, 2021/02/26
- Re: [a new branch?], Uwe Brauer, 2021/02/27
- Re: [a new branch?] (was: Output to directory patch), Al Haji-Ali, 2021/02/27
- Re: [a new branch?] (was: Output to directory patch), Tassilo Horn, 2021/02/28
- Re: [a new branch?], Uwe Brauer, 2021/02/28
- Re: [a new branch?], Tassilo Horn, 2021/02/28
- Re: [a new branch?],
Uwe Brauer <=
- Re: [a new branch?] (was: Output to directory patch), Mosè Giordano, 2021/02/25
- Re: [a new branch?], Uwe Brauer, 2021/02/25
- Re: [a new branch?] (was: Output to directory patch), Al Haji-Ali, 2021/02/25
- Re: Output to directory patch, Arash Esbati, 2021/02/25
- Re: Output to directory patch, Al Haji-Ali, 2021/02/25
- Re: Output to directory patch, Al Haji-Ali, 2021/02/26
- Re: Output to directory patch, Ikumi Keita, 2021/02/27
- Re: Output to directory patch, Al Haji-Ali, 2021/02/27
- Re: Output to directory patch, Ikumi Keita, 2021/02/28
- Re: Output to directory patch, Uwe Brauer, 2021/02/04