Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2021-05-07 09:03:11

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,078
Website

Changes in @git@ behaviour ?

Or a change in the Texpattern 4.9 tree git config ?

this PM, I ran my usual command to update my local repo of txp4.9-dev

shell
$ cd folder-name
$ git pull

I was greeted with the following (long winded?) comment before the usual console babble:

git pull
#hint: Pulling without specifying how to reconcile divergent branches is
#hint: discouraged. You can squelch this message by running one of the following
#hint: commands sometime before your next pull:
#hint: 
#hint:   git config pull.rebase false  # merge (the default strategy)
#hint:   git config pull.rebase true   # rebase
#hint:   git config pull.ff only       # fast-forward only
#hint: 
#hint: You can replace "git config" with "git config --global" to set a default
#hint: preference for all repositories. You can also pass --rebase, --no-rebase,
#hint: or --ff-only on the command line to override the configured default per
#hint: invocation.

Do I need to do anything, is it a temporary glitch somewhere or should I worry about the end of the world coming next? Grateful for any illuminating information of this. TY

ps – this is the Apple provided: git version 2.30.1 (Apple Git-130)

pps – apparently neither bash nor shell are understood as language identifiers for colour coding block code. That is not what the forum help says :-(


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#2 2021-05-07 10:01:01

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,269
Website GitHub

Re: Changes in @git@ behaviour ?

Weird. I updated mine just now and it did it without hitch (though I’m using a manually installed git 2.8.1).

Apparently The settings control what happens when there are changes in your branch but not present in the remote branch. So do you have any local changes at all in your current (or any?) branches when you do git status or git diff?

Anything with the word ‘rebase’ always fills me with (unfounded?) dread because it can shaft up repositories. So I’d be tempted (though don’t quote me) to set the fast forward option. Quite why it’s started doing this now I don’t know. You’ve got main and not master right?

If there are no obvious differences between your repo and the online one, and you don’t have anything in the local repo that’s of value you can always just cd out of the directory, delete it then re-clone the entire repo? Bit drastic but it might be less hassle.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#3 2021-05-07 10:32:16

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,078
Website

Re: Changes in @git@ behaviour ?

Bloke wrote #330062:

So do you have any local changes at all in your current (or any?) branches when you do git status or git diff?

Hmm, git status does mention a set of untracked files. But those have been there for a long time, as that folder contains a real test site (that good old world famous Textpattern test site …) and so far, I only had issues with git pull when I modified actual Textpattern files.

Anything with the word ‘rebase’ always fills me with (unfounded?) dread because it can shaft up repositories. So I’d be tempted (though don’t quote me) to set the fast forward option. Quite why it’s started doing this now I don’t know. You’ve got main and not master right?

Yeah, the word rebase is frightening, reason why I asked the question :-)

the active branch is dev.

PS – that stackoverflow is exactly what I encountered. Maybe the pull ff setting is the better option indeed. I’ll test at one point this WE. if it all blows up, I do have a backup of those “untracked“ files( incl the config.php) and can rebuild the whole thing.

Last edited by phiw13 (2021-05-07 10:36:47)


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#4 2021-05-08 12:11:51

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,078
Website

Re: Changes in @git@ behaviour ?

I managed to convince git to remove that warning, with git config pull.ff only. git pull is now quiet. Let’s see what happens when someone actually checks-in something in the 4.9-dev repo.

git status does not complain, except for the untracked files mentioned above, but that was the same before.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#5 2021-05-10 11:51:07

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,078
Website

Re: Changes in @git@ behaviour ?

As a follow-up.

Now that there have been a few check-ins and merges into the dev tree, I had the opportunity to verify that everything still works. Magic, nothing has blown up so far. Good.

Recap: if you have what is basically a read-only local repo that you use for testing, the following helps keeping a smooth updating process for the repo:

git config  pull.ff only

Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#6 2021-05-10 12:05:19

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,269
Website GitHub

Re: Changes in @git@ behaviour ?

Good to know, thank you. Glad it’s still functional.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#7 2021-05-11 09:07:30

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,078
Website

Re: Changes in @git@ behaviour ?

One more test, and to be safe: I modified a file locally followed by a git pull to update for the latest. As expected, Git complained with the usual message:

error: Your local changes to the following files would be overwritten by merge:
	textpattern/publish/taghandlers.php
Please commit your changes or stash them before you merge.
Aborting

I then reverted my changes and all was fine.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

Board footer

Powered by FluxBB