emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* git branch rename and git config q
@ 2022-06-06  4:13 Samuel Wales
  2022-06-06 16:22 ` Max Nikulin
  0 siblings, 1 reply; 11+ messages in thread
From: Samuel Wales @ 2022-06-06  4:13 UTC (permalink / raw)
  To: emacs-orgmode

org changed from master to main and maint to bugfix.  this is a q
related to that.

for a clean repo, i figured out that i can do cd to repo, git checkout
master, git branch -m main.

i have a repo where i have patches that i carry along i a local
branch.  these are rebased automagically when i upgrade org.

do i do git branch -m bugfix in my maint branch and then also
/manually/ change my git config to say bugfix instead of maint in
every place?  and then checkout local again?  will this preserve my
local branch with its rebased patches?

[branch "master"]
	remote = origin
	merge = refs/heads/master
[branch "local"]
	rebase = true
	remote = origin
	merge = refs/heads/maint
	# merge = refs/heads/master
[branch "testrelease"]
	remote = origin
	merge = refs/heads/maint
[branch "maint"]
	remote = origin
	merge = refs/heads/maint

this is all from many years ago.  upgrading in local will nicely
upgrade maint and put my patches on top in the local branch.

my goal is to upgrade my repo to the latest bugfix with my patches on
top and the same auto rebase setup.  thanks!


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: git branch rename and git config q
  2022-06-06  4:13 git branch rename and git config q Samuel Wales
@ 2022-06-06 16:22 ` Max Nikulin
  2022-06-07  3:33   ` Samuel Wales
  0 siblings, 1 reply; 11+ messages in thread
From: Max Nikulin @ 2022-06-06 16:22 UTC (permalink / raw)
  To: emacs-orgmode

On 06/06/2022 11:13, Samuel Wales wrote:
> 
> i have a repo where i have patches that i carry along i a local
> branch.  these are rebased automagically when i upgrade org.

You may change remote for this repository. Perhaps you do not need to 
rename branches.
https://list.orgmode.org/sj91nb$d9j$1@ciao.gmane.io/

https://git-scm.com/book/en/v2



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: git branch rename and git config q
  2022-06-06 16:22 ` Max Nikulin
@ 2022-06-07  3:33   ` Samuel Wales
  2022-06-07 15:24     ` Max Nikulin
  0 siblings, 1 reply; 11+ messages in thread
From: Samuel Wales @ 2022-06-07  3:33 UTC (permalink / raw)
  To: Max Nikulin; +Cc: emacs-orgmode

thanks for the links [my brain is not up to understanding atm].  when
you say perhaps i do not need to rename branches, do you mean that my
guess at a solution had a redundant step?  and that step was manually
edit config file?  no need there?

the last par of your email makes it seem as if i should do a git
[interactive?] rebase operation from [top of] local on bugfix, even
though it is already rebasing on maint each upgrade.  would that be a
good description of what you meant?


On 6/6/22, Max Nikulin <manikulin@gmail.com> wrote:
> On 06/06/2022 11:13, Samuel Wales wrote:
>>
>> i have a repo where i have patches that i carry along i a local
>> branch.  these are rebased automagically when i upgrade org.
>
> You may change remote for this repository. Perhaps you do not need to
> rename branches.
> https://list.orgmode.org/sj91nb$d9j$1@ciao.gmane.io/
>
> https://git-scm.com/book/en/v2
>
>
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: git branch rename and git config q
  2022-06-07  3:33   ` Samuel Wales
@ 2022-06-07 15:24     ` Max Nikulin
  2022-06-07 23:35       ` Samuel Wales
  0 siblings, 1 reply; 11+ messages in thread
From: Max Nikulin @ 2022-06-07 15:24 UTC (permalink / raw)
  To: emacs-orgmode

On 07/06/2022 10:33, Samuel Wales wrote:
> 
> the last par of your email makes it seem as if i should do a git
> [interactive?] rebase operation from [top of] local on bugfix, even
> though it is already rebasing on maint each upgrade.  would that be a
> good description of what you meant?

The state of your local repository is unclear for me. Maybe
     git remove -v show
     git branch -r -v
will shed some light.

maint branch existed in the repository hosted at orgmode.org. During 
migration to savannah it was renamed to bugfix, so if earlier you 
rebased local branches onto maint as the release branch, you should use 
bugfix (from savannah) now.

Your "local" branch has "rebase" setting, I am unsure concerning its 
precise meaning. I usually do not set any remote for local branches and 
explicitly specify target commit every time I need to rebase them.

> do i do git branch -m bugfix in my maint branch

This renames just your local branch but should not affect its 
association with remote (orgmode.org) branch. From my point of view it 
just increases confusion. Add new remote, checkout bugfix branch (it 
will track the branch from proper remote repository), then rebase your 
local modifications onto bugfix. You can use "git rebase REMOTE/bugfix" 
(I do not know your remote names, replace REMOTE to the name of the 
savannah repository). Target branch name for rebase is no more than 
convenient way to specify particular commit.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: git branch rename and git config q
  2022-06-07 15:24     ` Max Nikulin
@ 2022-06-07 23:35       ` Samuel Wales
  2022-06-08  2:10         ` Ihor Radchenko
  0 siblings, 1 reply; 11+ messages in thread
From: Samuel Wales @ 2022-06-07 23:35 UTC (permalink / raw)
  To: Max Nikulin; +Cc: emacs-orgmode

more confused than ever.  i hoped i could just run a rename command,
or possibly rename maint to bugfix in config.

there is no git remove command in my version of git.  i tried remote
instead.  on branch local.

$ git remote -v show; git branch -r -v
origin	https://code.orgmode.org/bzg/org-mode.git (fetch)
origin	https://code.orgmode.org/bzg/org-mode.git (push)
  origin/Globals                               796952ac7 Add missing
declarations in org-element
  origin/HEAD                                  -> origin/master
  origin/backport-master                       6f9184a29 Merge branch
'maint' into backport-master
  origin/dan-session-errors                    6d28c79cc ob: python:
catch errors in sessions
  origin/emacs-sync                            dd9105d17 Merge branch
'maint' into emacs-sync
  origin/emacs-sync-9.3.8                      f7dc6be22 Backport
commit 78eacf31e from Emacs
  origin/file-header                           d234a9973 ob-R: Delete
duplicated function
  origin/file-header-alt-ui                    d1c50e737 working
  origin/fix-doc                               c34121c60 Documentation fix
  origin/hide-table-column                     9655ba966 org-table:
Obey <c> cookie when aligning a table
  origin/km/from-emacs-master                  0f7fcc9de Backport
commit 6a3920c07 from Emacs
  origin/ledger                                bb1241026 babel: Use
common evaluation mechanism for ledger
  origin/maint                                 dcc3a84a9 keys:
Re-instate some RET bindings
  origin/maint-quotes                          08ee6c60d Backport
commit 26bd978 from Emacs master branch
  origin/master                                d70f28067 org-macs:
Allow for nil ffap-url-regexp
  origin/minted                                aa86ce564 org-latex.el:
minor docstring clean up.
  origin/next                                  655c08dcc org-clock:
Fix failing tests
  origin/org-7.8.50                            2ddc9b60b Remove
org-ascii, org-html, org-latex and org-odt
  origin/org-tempo                             20afd5b44 ;
org-tempo.el: add a missing require
  origin/scratch/sm/agenda-lexical             1fd7d4865 Merge branch
'master' into scratch/sm/agenda-lexical
  origin/stow-design                           036b876f3 Bugfix:
Disable typecheck if support is missing.
  origin/taskjuggler-export                    caed2af32 Merge branch
'master' into taskjuggler-export
  origin/tehom-html-export-refactor-build-link 76230e9f8 Re-added code
to inline descriptions as images
  origin/tehom-master                          413e6b4ee Add handling
of blockquote and output formats that must be flowed.
  origin/top-properties                        c81bc4d9c Update custom
properties handling
  origin/wip                                   8fd176ee7 Merge branch
'maint' into wip
  origin/wip-agenda-speedup                    f5bc563a6 org-agenda:
Optimize log data processing
  origin/wip-cite                              5af597836 org-element: Tiny fix
  origin/wip-cite-awe                          cb0085e07 WIP support
for exporting citations
  origin/wip-cite-new                          b373a2f54 oc-csl:
Implement `csl' citation processor
  origin/wip-lint                              406cfbf2a org-element:
Fix parsing recursive babel calls
  origin/wip-sitemap                           1a12f3854 ox-publish:
Remove :sitemap-sans-extension

> Your "local" branch has "rebase" setting, I am unsure concerning its precise meaning. I usually do not set any remote for local branches and explicitly specify target commit every time I need to rebase them.

i followed instructions from org manual or similar long ago and it
worked perfectly.  it auto-rebases my patches every time i upgrade org
which is what i want.  that is, i am in branch local, and i pull, and
git sticks the latest changes from maint on top of local for me, then
sticks my patches on top of that for me.  then i just make.  i want to
continue doing all of this.  i don't want to change that workflow if
possible.  i know how to deal with it after many years of use.  i am
limited in computer use.

i think that you have different workflow from me and more knowledge of
git, so this is why it is confusing for me.

On 6/7/22, Max Nikulin <manikulin@gmail.com> wrote:
> On 07/06/2022 10:33, Samuel Wales wrote:
>>
>> the last par of your email makes it seem as if i should do a git
>> [interactive?] rebase operation from [top of] local on bugfix, even
>> though it is already rebasing on maint each upgrade.  would that be a
>> good description of what you meant?
>
> The state of your local repository is unclear for me. Maybe
>      git remove -v show
>      git branch -r -v
> will shed some light.
>
> maint branch existed in the repository hosted at orgmode.org. During
> migration to savannah it was renamed to bugfix, so if earlier you
> rebased local branches onto maint as the release branch, you should use
> bugfix (from savannah) now.
>
> Your "local" branch has "rebase" setting, I am unsure concerning its
> precise meaning. I usually do not set any remote for local branches and
> explicitly specify target commit every time I need to rebase them.
>
>> do i do git branch -m bugfix in my maint branch
>
> This renames just your local branch but should not affect its
> association with remote (orgmode.org) branch. From my point of view it
> just increases confusion. Add new remote, checkout bugfix branch (it
> will track the branch from proper remote repository), then rebase your
> local modifications onto bugfix. You can use "git rebase REMOTE/bugfix"
> (I do not know your remote names, replace REMOTE to the name of the
> savannah repository). Target branch name for rebase is no more than
> convenient way to specify particular commit.
>
>
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: git branch rename and git config q
  2022-06-07 23:35       ` Samuel Wales
@ 2022-06-08  2:10         ` Ihor Radchenko
  2022-06-08 16:20           ` Max Nikulin
  0 siblings, 1 reply; 11+ messages in thread
From: Ihor Radchenko @ 2022-06-08  2:10 UTC (permalink / raw)
  To: Samuel Wales; +Cc: Max Nikulin, emacs-orgmode

Samuel Wales <samologist@gmail.com> writes:

> more confused than ever.  i hoped i could just run a rename command,
> or possibly rename maint to bugfix in config.

Max tends to go very deeply into details.

For starters, you can just:
1. Rename maint -> bugfix
2. Rename master -> main
3. Set origin to https://git.sv.gnu.org/emacs/org-mode.git (read-only)
4. Set remote for the local main and bugfix branches as origin
5. fetch the latest origin
6. Rebase you local branches onto origin/main and origin/bugfix

I strongly recommend using magit to work with git repos.

Best,
Ihor


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: git branch rename and git config q
  2022-06-08  2:10         ` Ihor Radchenko
@ 2022-06-08 16:20           ` Max Nikulin
  2022-06-08 20:50             ` Tim Cross
  2022-06-09  0:09             ` Samuel Wales
  0 siblings, 2 replies; 11+ messages in thread
From: Max Nikulin @ 2022-06-08 16:20 UTC (permalink / raw)
  To: emacs-orgmode

On 08/06/2022 09:10, Ihor Radchenko wrote:
> Samuel Wales writes:
> 
>> more confused than ever.  i hoped i could just run a rename command,
>> or possibly rename maint to bugfix in config.
> 
> Max tends to go very deeply into details.

I never used branch.*.rebase configuration. By the way, git-pull and 
git-config man pages a full of warnings related to this feature. I 
assume that source of configuration is
https://orgmode.org/worg/org-faq.html#keeping-local-changes-current-with-Org-mode-development

> For starters, you can just:
> 1. Rename maint -> bugfix
> 2. Rename master -> main
> 3. Set origin to https://git.sv.gnu.org/emacs/org-mode.git (read-only)
> 4. Set remote for the local main and bugfix branches as origin
> 5. fetch the latest origin
> 6. Rebase you local branches onto origin/main and origin/bugfix
> 
> I strongly recommend using magit to work with git repos.

I have not tested the following commands

     git remote set-url origin 
https://git.savannah.gnu.org/git/emacs/org-mode.git
     git branch --set-upstream-to=bugfix local
     git fetch

I see no point in renaming of branches since branches with new names and 
proper tracking will be created on attempt to checkout.

I am sorry for a type, in my previous mail it should be "git remote -v 
show", not "git remove -v show".

You may try "git fetch --prune" to remove references to remote branches 
that are not existing in the repository any more.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: git branch rename and git config q
  2022-06-08 16:20           ` Max Nikulin
@ 2022-06-08 20:50             ` Tim Cross
  2022-06-09  0:09             ` Samuel Wales
  1 sibling, 0 replies; 11+ messages in thread
From: Tim Cross @ 2022-06-08 20:50 UTC (permalink / raw)
  To: emacs-orgmode


Max Nikulin <manikulin@gmail.com> writes:

> I never used branch.*.rebase configuration. By the way, git-pull and git-config
> man pages a full of warnings related to this feature. I assume that source of
> configuration is
> https://orgmode.org/worg/org-faq.html#keeping-local-changes-current-with-Org-mode-development
>

+1. I find most 'automatic' git configurations more problematic and
dangerous than necessary. With a version control system, I think you
want maximum manual control. 

With regards to the issues Samual is running into, I would say take a
leaf from the hitch hikers guide to the galaxy and relax. This can
actually be a lot simpler than you realise. On some levels, I think you
may be over thinking it. 

When you do a git fetch it will pull down the new branch definitions for
you and you will be able to use them as you would any branch name to do
things like rebase your local branch against that branch. 

You can remove old remote definitions as outlined by Maxin. You can also
just ignore them. You will probably want to update your automatic rebase
configuration, but of course, as the old remotes are no longer being
used, it probably won't have any impact even if you just leave it in
place.  You will just need to do the rebasing manually, which I think is
a much better idea anyway. 

The only slight complication with the new branch names can arise if you
do push data up to those branches. Do you need to do that or is your use
case just as a consumer i.e. do you have write permission on the remote
org git repository at savannah? If you don't need to push your changes
back up, then you don't need to link your local branches with the remote
branches. 

BTW I think Github has some pretty decent documentation about all of
this and some good examples on how you connect a local branch to a
remote one. You might find what they have and their examples useful. 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: git branch rename and git config q
  2022-06-08 16:20           ` Max Nikulin
  2022-06-08 20:50             ` Tim Cross
@ 2022-06-09  0:09             ` Samuel Wales
  2022-06-09  0:16               ` Samuel Wales
  1 sibling, 1 reply; 11+ messages in thread
From: Samuel Wales @ 2022-06-09  0:09 UTC (permalink / raw)
  To: Max Nikulin; +Cc: emacs-orgmode

i /might/ have gotten it fixed.  will have to confirm when can.

takes me time to do things so i have drafts, but it sounds like this
by max is a shortened version, so i tried it:

vvv
I have not tested the following commands

    git remote set-url origin
https://git.savannah.gnu.org/git/emacs/org-mode.git
    git branch --set-upstream-to=bugfix local
    git fetch
^^^

i assume that this is an untested script for doing what i want.  the
fact that it is turnkey is a huge boon because my cognition and
ability to use computers lmited and have consequences.  looks a bit
like a yes to my op q viz. can i do this?

i greatly appreciate the help from all contributors in addition, even
if not understand all of it or can't do parts.

the upgrade to recent org might be needed for any fix to the needed
org-capture extension so if this works it is good.


so what i did was run those 3 commands [one does not work] and edit
config manually and pull.  here is a transcript plus my complete
config.  i will have to reproduce using my shell pull so i can get the
diff.  cannot do now but cp etc.

i find editing the config manually more straightforward than running a
command to edit it.

i THINK this worked.  i had to figure out a trivial guess at what to
do to fix maint branch.  on clean local branch.  transcript:

vvv
08-Wed-16-06-47 ...$ cp -a org-mode--my-maint--ok-to-pull
TEST-branch-rename--org-mode--my-maint--ok-to-pull
cd TEST-branch-rename--org-mode--my-maint--ok-to-pull/
08-Wed-16-07-25 ...$ 08-Wed-16-07-25
.../TEST-branch-rename--org-mode--my-maint--ok-to-pull$
08-Wed-16-07-36 .../TEST-branch-rename--org-mode--my-maint--ok-to-pull$
08-Wed-16-07-36
.../TEST-branch-rename--org-mode--my-maint--ok-to-pull$     git remote
set-url origin https://git.savannah.gnu.org/git/emacs/org-mode.git

08-Wed-16-07-48
.../TEST-branch-rename--org-mode--my-maint--ok-to-pull$
08-Wed-16-07-48
.../TEST-branch-rename--org-mode--my-maint--ok-to-pull$  git branch
--set-upstream-to=bugfix local
error: the requested upstream branch 'bugfix' does not exist
hint:
hint: If you are planning on basing your work on an upstream
hint: branch that already exists at the remote, you may need to
hint: run "git fetch" to retrieve it.
hint:
hint: If you are planning to push out a new local branch that
hint: will track its remote counterpart, you may want to use
hint: "git push -u" to set the upstream config as you push.
(1) 08-Wed-16-07-58
.../TEST-branch-rename--org-mode--my-maint--ok-to-pull$ git fetch
remote: Counting objects: 4972, done.
remote: Compressing objects: 100% (1487/1487), done.
remote: Total 4972 (delta 3897), reused 4531 (delta 3485)
Receiving objects: 100% (4972/4972), 2.51 MiB | 3.19 MiB/s, done.
Resolving deltas: 100% (3897/3897), completed with 310 local objects.
From https://git.savannah.gnu.org/git/emacs/org-mode
 * [new branch]          bugfix        -> origin/bugfix
   dd9105d17..1466950c7  emacs-sync    -> origin/emacs-sync
 * [new branch]          main          -> origin/main
 * [new tag]             release_9.5.4 -> release_9.5.4
 * [new tag]             release_9.5   -> release_9.5
 * [new tag]             release_9.5.1 -> release_9.5.1
 * [new tag]             release_9.5.2 -> release_9.5.2
 * [new tag]             release_9.5.3 -> release_9.5.3
08-Wed-16-08-59
.../TEST-branch-rename--org-mode--my-maint--ok-to-pull$ git branch
--set-upstream-to=bugfix local
error: the requested upstream branch 'bugfix' does not exist
hint:
hint: If you are planning on basing your work on an upstream
hint: branch that already exists at the remote, you may need to
hint: run "git fetch" to retrieve it.
hint:
hint: If you are planning to push out a new local branch that
hint: will track its remote counterpart, you may want to use
hint: "git push -u" to set the upstream config as you push.
(1) 08-Wed-16-09-17
.../TEST-branch-rename--org-mode--my-maint--ok-to-pull$ git branch
--set-upstream-to=bugfix local
error: the requested upstream branch 'bugfix' does not exist
hint:
hint: If you are planning on basing your work on an upstream
hint: branch that already exists at the remote, you may need to
hint: run "git fetch" to retrieve it.
hint:
hint: If you are planning to push out a new local branch that
hint: will track its remote counterpart, you may want to use
hint: "git push -u" to set the upstream config as you push.
(1) 08-Wed-16-11-52
.../TEST-branch-rename--org-mode--my-maint--ok-to-pull$ git pull
First, rewinding head to replay your work on top of it...
Applying: === alpha agenda mark ring push
Applying: === alpha make agenda display inactive timestamp lines with a new face
Applying: === alpha location of time span annotation
Applying: === alpha kludge -- put a newline when editing babel source blocks
Applying: === alpha agenda -- add event, remove colons and spaces, add
comment re ts feature
Applying: === alpha location of possible header insertion so it can be
made varibale pitch
Applying: === alpha remove the parens from ido completion of olpaths
Applying: === alpha comment and change active ts = event change
Applying: === alpha =maybe try to move nokori to today or move by
days, not just one
08-Wed-16-12-03 .../TEST-branch-rename--org-mode--my-maint--ok-to-pull$
^^^

notice that it rebased my patches all by itself.  [at least this
time.]  not sure if dangerous my case; wfm; i do not push.  i do not
get what gets dangerously rewritten.  my patches get merge conflicts.
org patches are presumably not rewritten.

merge conflicts instill rational fear but that is not avoidable here.
and did not even occur for such a huge upgrade.

uf you are curious about my patches please ask.  some are mere guesses
at locations to do things that i am ot capable of.  some are ueful
tiny changes.  not fsf signed.  have contributed tinychanes.

config:
[after manual editing]

vvv
[core]
	repositoryformatversion = 0
	filemode = true
	bare = false
	logallrefupdates = true
	ignorecase = true
[remote "origin"]
        # https://code.orgmode.org https://savannah.nongnu.org https://sr.ht
	url = https://git.savannah.gnu.org/git/emacs/org-mode.git
        # url = git://orgmode.org/org-mode.git
        #cz is 1h behind orgmode.org -- either should work
        # 	url = git://repo.or.cz/org-mode.git
	fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
	remote = origin
	merge = refs/heads/master
[branch "local"]
	rebase = true
	remote = origin
	merge = refs/heads/bugfix
	# merge = refs/heads/master
[branch "testrelease"]
        # fixme idk why i have this branch and can maybe del it
	remote = origin
	merge = refs/heads/maint
[branch "maint"]
	remote = origin
	merge = refs/heads/maint
[diff]
^^^

-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: git branch rename and git config q
  2022-06-09  0:09             ` Samuel Wales
@ 2022-06-09  0:16               ` Samuel Wales
  2022-06-09  0:23                 ` Samuel Wales
  0 siblings, 1 reply; 11+ messages in thread
From: Samuel Wales @ 2022-06-09  0:16 UTC (permalink / raw)
  To: Max Nikulin; +Cc: emacs-orgmode

p.s. than k you for the faq link.  did not understand the wording re
the makefile stuff re wehther relevant.  the point about my patches
being semantically wrong in principle is a good one but any solution
other than submitting my patches and having them accepted would have
the same problem i thik.  undoing merge turnkey good.

On 6/8/22, Samuel Wales <samologist@gmail.com> wrote:
> i /might/ have gotten it fixed.  will have to confirm when can.
>
> takes me time to do things so i have drafts, but it sounds like this
> by max is a shortened version, so i tried it:
>
> vvv
> I have not tested the following commands
>
>     git remote set-url origin
> https://git.savannah.gnu.org/git/emacs/org-mode.git
>     git branch --set-upstream-to=bugfix local
>     git fetch
> ^^^
>
> i assume that this is an untested script for doing what i want.  the
> fact that it is turnkey is a huge boon because my cognition and
> ability to use computers lmited and have consequences.  looks a bit
> like a yes to my op q viz. can i do this?
>
> i greatly appreciate the help from all contributors in addition, even
> if not understand all of it or can't do parts.
>
> the upgrade to recent org might be needed for any fix to the needed
> org-capture extension so if this works it is good.
>
>
> so what i did was run those 3 commands [one does not work] and edit
> config manually and pull.  here is a transcript plus my complete
> config.  i will have to reproduce using my shell pull so i can get the
> diff.  cannot do now but cp etc.
>
> i find editing the config manually more straightforward than running a
> command to edit it.
>
> i THINK this worked.  i had to figure out a trivial guess at what to
> do to fix maint branch.  on clean local branch.  transcript:
>
> vvv
> 08-Wed-16-06-47 ...$ cp -a org-mode--my-maint--ok-to-pull
> TEST-branch-rename--org-mode--my-maint--ok-to-pull
> cd TEST-branch-rename--org-mode--my-maint--ok-to-pull/
> 08-Wed-16-07-25 ...$ 08-Wed-16-07-25
> .../TEST-branch-rename--org-mode--my-maint--ok-to-pull$
> 08-Wed-16-07-36 .../TEST-branch-rename--org-mode--my-maint--ok-to-pull$
> 08-Wed-16-07-36
> .../TEST-branch-rename--org-mode--my-maint--ok-to-pull$     git remote
> set-url origin https://git.savannah.gnu.org/git/emacs/org-mode.git
>
> 08-Wed-16-07-48
> .../TEST-branch-rename--org-mode--my-maint--ok-to-pull$
> 08-Wed-16-07-48
> .../TEST-branch-rename--org-mode--my-maint--ok-to-pull$  git branch
> --set-upstream-to=bugfix local
> error: the requested upstream branch 'bugfix' does not exist
> hint:
> hint: If you are planning on basing your work on an upstream
> hint: branch that already exists at the remote, you may need to
> hint: run "git fetch" to retrieve it.
> hint:
> hint: If you are planning to push out a new local branch that
> hint: will track its remote counterpart, you may want to use
> hint: "git push -u" to set the upstream config as you push.
> (1) 08-Wed-16-07-58
> .../TEST-branch-rename--org-mode--my-maint--ok-to-pull$ git fetch
> remote: Counting objects: 4972, done.
> remote: Compressing objects: 100% (1487/1487), done.
> remote: Total 4972 (delta 3897), reused 4531 (delta 3485)
> Receiving objects: 100% (4972/4972), 2.51 MiB | 3.19 MiB/s, done.
> Resolving deltas: 100% (3897/3897), completed with 310 local objects.
> From https://git.savannah.gnu.org/git/emacs/org-mode
>  * [new branch]          bugfix        -> origin/bugfix
>    dd9105d17..1466950c7  emacs-sync    -> origin/emacs-sync
>  * [new branch]          main          -> origin/main
>  * [new tag]             release_9.5.4 -> release_9.5.4
>  * [new tag]             release_9.5   -> release_9.5
>  * [new tag]             release_9.5.1 -> release_9.5.1
>  * [new tag]             release_9.5.2 -> release_9.5.2
>  * [new tag]             release_9.5.3 -> release_9.5.3
> 08-Wed-16-08-59
> .../TEST-branch-rename--org-mode--my-maint--ok-to-pull$ git branch
> --set-upstream-to=bugfix local
> error: the requested upstream branch 'bugfix' does not exist
> hint:
> hint: If you are planning on basing your work on an upstream
> hint: branch that already exists at the remote, you may need to
> hint: run "git fetch" to retrieve it.
> hint:
> hint: If you are planning to push out a new local branch that
> hint: will track its remote counterpart, you may want to use
> hint: "git push -u" to set the upstream config as you push.
> (1) 08-Wed-16-09-17
> .../TEST-branch-rename--org-mode--my-maint--ok-to-pull$ git branch
> --set-upstream-to=bugfix local
> error: the requested upstream branch 'bugfix' does not exist
> hint:
> hint: If you are planning on basing your work on an upstream
> hint: branch that already exists at the remote, you may need to
> hint: run "git fetch" to retrieve it.
> hint:
> hint: If you are planning to push out a new local branch that
> hint: will track its remote counterpart, you may want to use
> hint: "git push -u" to set the upstream config as you push.
> (1) 08-Wed-16-11-52
> .../TEST-branch-rename--org-mode--my-maint--ok-to-pull$ git pull
> First, rewinding head to replay your work on top of it...
> Applying: === alpha agenda mark ring push
> Applying: === alpha make agenda display inactive timestamp lines with a new
> face
> Applying: === alpha location of time span annotation
> Applying: === alpha kludge -- put a newline when editing babel source
> blocks
> Applying: === alpha agenda -- add event, remove colons and spaces, add
> comment re ts feature
> Applying: === alpha location of possible header insertion so it can be
> made varibale pitch
> Applying: === alpha remove the parens from ido completion of olpaths
> Applying: === alpha comment and change active ts = event change
> Applying: === alpha =maybe try to move nokori to today or move by
> days, not just one
> 08-Wed-16-12-03 .../TEST-branch-rename--org-mode--my-maint--ok-to-pull$
> ^^^
>
> notice that it rebased my patches all by itself.  [at least this
> time.]  not sure if dangerous my case; wfm; i do not push.  i do not
> get what gets dangerously rewritten.  my patches get merge conflicts.
> org patches are presumably not rewritten.
>
> merge conflicts instill rational fear but that is not avoidable here.
> and did not even occur for such a huge upgrade.
>
> uf you are curious about my patches please ask.  some are mere guesses
> at locations to do things that i am ot capable of.  some are ueful
> tiny changes.  not fsf signed.  have contributed tinychanes.
>
> config:
> [after manual editing]
>
> vvv
> [core]
> 	repositoryformatversion = 0
> 	filemode = true
> 	bare = false
> 	logallrefupdates = true
> 	ignorecase = true
> [remote "origin"]
>         # https://code.orgmode.org https://savannah.nongnu.org
> https://sr.ht
> 	url = https://git.savannah.gnu.org/git/emacs/org-mode.git
>         # url = git://orgmode.org/org-mode.git
>         #cz is 1h behind orgmode.org -- either should work
>         # 	url = git://repo.or.cz/org-mode.git
> 	fetch = +refs/heads/*:refs/remotes/origin/*
> [branch "master"]
> 	remote = origin
> 	merge = refs/heads/master
> [branch "local"]
> 	rebase = true
> 	remote = origin
> 	merge = refs/heads/bugfix
> 	# merge = refs/heads/master
> [branch "testrelease"]
>         # fixme idk why i have this branch and can maybe del it
> 	remote = origin
> 	merge = refs/heads/maint
> [branch "maint"]
> 	remote = origin
> 	merge = refs/heads/maint
> [diff]
> ^^^
>
> --
> The Kafka Pandemic
>
> A blog about science, health, human rights, and misopathy:
> https://thekafkapandemic.blogspot.com
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: git branch rename and git config q
  2022-06-09  0:16               ` Samuel Wales
@ 2022-06-09  0:23                 ` Samuel Wales
  0 siblings, 0 replies; 11+ messages in thread
From: Samuel Wales @ 2022-06-09  0:23 UTC (permalink / raw)
  To: Max Nikulin; +Cc: emacs-orgmode

corredction: i think i meant local branch for the maual change.  ad i
think it was merly 	merge = refs/heads/bugfix.


On 6/8/22, Samuel Wales <samologist@gmail.com> wrote:
> p.s. than k you for the faq link.  did not understand the wording re
> the makefile stuff re wehther relevant.  the point about my patches
> being semantically wrong in principle is a good one but any solution
> other than submitting my patches and having them accepted would have
> the same problem i thik.  undoing merge turnkey good.
>
> On 6/8/22, Samuel Wales <samologist@gmail.com> wrote:
>> i /might/ have gotten it fixed.  will have to confirm when can.
>>
>> takes me time to do things so i have drafts, but it sounds like this
>> by max is a shortened version, so i tried it:
>>
>> vvv
>> I have not tested the following commands
>>
>>     git remote set-url origin
>> https://git.savannah.gnu.org/git/emacs/org-mode.git
>>     git branch --set-upstream-to=bugfix local
>>     git fetch
>> ^^^
>>
>> i assume that this is an untested script for doing what i want.  the
>> fact that it is turnkey is a huge boon because my cognition and
>> ability to use computers lmited and have consequences.  looks a bit
>> like a yes to my op q viz. can i do this?
>>
>> i greatly appreciate the help from all contributors in addition, even
>> if not understand all of it or can't do parts.
>>
>> the upgrade to recent org might be needed for any fix to the needed
>> org-capture extension so if this works it is good.
>>
>>
>> so what i did was run those 3 commands [one does not work] and edit
>> config manually and pull.  here is a transcript plus my complete
>> config.  i will have to reproduce using my shell pull so i can get the
>> diff.  cannot do now but cp etc.
>>
>> i find editing the config manually more straightforward than running a
>> command to edit it.
>>
>> i THINK this worked.  i had to figure out a trivial guess at what to
>> do to fix maint branch.  on clean local branch.  transcript:
>>
>> vvv
>> 08-Wed-16-06-47 ...$ cp -a org-mode--my-maint--ok-to-pull
>> TEST-branch-rename--org-mode--my-maint--ok-to-pull
>> cd TEST-branch-rename--org-mode--my-maint--ok-to-pull/
>> 08-Wed-16-07-25 ...$ 08-Wed-16-07-25
>> .../TEST-branch-rename--org-mode--my-maint--ok-to-pull$
>> 08-Wed-16-07-36 .../TEST-branch-rename--org-mode--my-maint--ok-to-pull$
>> 08-Wed-16-07-36
>> .../TEST-branch-rename--org-mode--my-maint--ok-to-pull$     git remote
>> set-url origin https://git.savannah.gnu.org/git/emacs/org-mode.git
>>
>> 08-Wed-16-07-48
>> .../TEST-branch-rename--org-mode--my-maint--ok-to-pull$
>> 08-Wed-16-07-48
>> .../TEST-branch-rename--org-mode--my-maint--ok-to-pull$  git branch
>> --set-upstream-to=bugfix local
>> error: the requested upstream branch 'bugfix' does not exist
>> hint:
>> hint: If you are planning on basing your work on an upstream
>> hint: branch that already exists at the remote, you may need to
>> hint: run "git fetch" to retrieve it.
>> hint:
>> hint: If you are planning to push out a new local branch that
>> hint: will track its remote counterpart, you may want to use
>> hint: "git push -u" to set the upstream config as you push.
>> (1) 08-Wed-16-07-58
>> .../TEST-branch-rename--org-mode--my-maint--ok-to-pull$ git fetch
>> remote: Counting objects: 4972, done.
>> remote: Compressing objects: 100% (1487/1487), done.
>> remote: Total 4972 (delta 3897), reused 4531 (delta 3485)
>> Receiving objects: 100% (4972/4972), 2.51 MiB | 3.19 MiB/s, done.
>> Resolving deltas: 100% (3897/3897), completed with 310 local objects.
>> From https://git.savannah.gnu.org/git/emacs/org-mode
>>  * [new branch]          bugfix        -> origin/bugfix
>>    dd9105d17..1466950c7  emacs-sync    -> origin/emacs-sync
>>  * [new branch]          main          -> origin/main
>>  * [new tag]             release_9.5.4 -> release_9.5.4
>>  * [new tag]             release_9.5   -> release_9.5
>>  * [new tag]             release_9.5.1 -> release_9.5.1
>>  * [new tag]             release_9.5.2 -> release_9.5.2
>>  * [new tag]             release_9.5.3 -> release_9.5.3
>> 08-Wed-16-08-59
>> .../TEST-branch-rename--org-mode--my-maint--ok-to-pull$ git branch
>> --set-upstream-to=bugfix local
>> error: the requested upstream branch 'bugfix' does not exist
>> hint:
>> hint: If you are planning on basing your work on an upstream
>> hint: branch that already exists at the remote, you may need to
>> hint: run "git fetch" to retrieve it.
>> hint:
>> hint: If you are planning to push out a new local branch that
>> hint: will track its remote counterpart, you may want to use
>> hint: "git push -u" to set the upstream config as you push.
>> (1) 08-Wed-16-09-17
>> .../TEST-branch-rename--org-mode--my-maint--ok-to-pull$ git branch
>> --set-upstream-to=bugfix local
>> error: the requested upstream branch 'bugfix' does not exist
>> hint:
>> hint: If you are planning on basing your work on an upstream
>> hint: branch that already exists at the remote, you may need to
>> hint: run "git fetch" to retrieve it.
>> hint:
>> hint: If you are planning to push out a new local branch that
>> hint: will track its remote counterpart, you may want to use
>> hint: "git push -u" to set the upstream config as you push.
>> (1) 08-Wed-16-11-52
>> .../TEST-branch-rename--org-mode--my-maint--ok-to-pull$ git pull
>> First, rewinding head to replay your work on top of it...
>> Applying: === alpha agenda mark ring push
>> Applying: === alpha make agenda display inactive timestamp lines with a
>> new
>> face
>> Applying: === alpha location of time span annotation
>> Applying: === alpha kludge -- put a newline when editing babel source
>> blocks
>> Applying: === alpha agenda -- add event, remove colons and spaces, add
>> comment re ts feature
>> Applying: === alpha location of possible header insertion so it can be
>> made varibale pitch
>> Applying: === alpha remove the parens from ido completion of olpaths
>> Applying: === alpha comment and change active ts = event change
>> Applying: === alpha =maybe try to move nokori to today or move by
>> days, not just one
>> 08-Wed-16-12-03 .../TEST-branch-rename--org-mode--my-maint--ok-to-pull$
>> ^^^
>>
>> notice that it rebased my patches all by itself.  [at least this
>> time.]  not sure if dangerous my case; wfm; i do not push.  i do not
>> get what gets dangerously rewritten.  my patches get merge conflicts.
>> org patches are presumably not rewritten.
>>
>> merge conflicts instill rational fear but that is not avoidable here.
>> and did not even occur for such a huge upgrade.
>>
>> uf you are curious about my patches please ask.  some are mere guesses
>> at locations to do things that i am ot capable of.  some are ueful
>> tiny changes.  not fsf signed.  have contributed tinychanes.
>>
>> config:
>> [after manual editing]
>>
>> vvv
>> [core]
>> 	repositoryformatversion = 0
>> 	filemode = true
>> 	bare = false
>> 	logallrefupdates = true
>> 	ignorecase = true
>> [remote "origin"]
>>         # https://code.orgmode.org https://savannah.nongnu.org
>> https://sr.ht
>> 	url = https://git.savannah.gnu.org/git/emacs/org-mode.git
>>         # url = git://orgmode.org/org-mode.git
>>         #cz is 1h behind orgmode.org -- either should work
>>         # 	url = git://repo.or.cz/org-mode.git
>> 	fetch = +refs/heads/*:refs/remotes/origin/*
>> [branch "master"]
>> 	remote = origin
>> 	merge = refs/heads/master
>> [branch "local"]
>> 	rebase = true
>> 	remote = origin
>> 	merge = refs/heads/bugfix
>> 	# merge = refs/heads/master
>> [branch "testrelease"]
>>         # fixme idk why i have this branch and can maybe del it
>> 	remote = origin
>> 	merge = refs/heads/maint
>> [branch "maint"]
>> 	remote = origin
>> 	merge = refs/heads/maint
>> [diff]
>> ^^^
>>
>> --
>> The Kafka Pandemic
>>
>> A blog about science, health, human rights, and misopathy:
>> https://thekafkapandemic.blogspot.com
>>
>
>
> --
> The Kafka Pandemic
>
> A blog about science, health, human rights, and misopathy:
> https://thekafkapandemic.blogspot.com
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-06-09  0:24 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-06  4:13 git branch rename and git config q Samuel Wales
2022-06-06 16:22 ` Max Nikulin
2022-06-07  3:33   ` Samuel Wales
2022-06-07 15:24     ` Max Nikulin
2022-06-07 23:35       ` Samuel Wales
2022-06-08  2:10         ` Ihor Radchenko
2022-06-08 16:20           ` Max Nikulin
2022-06-08 20:50             ` Tim Cross
2022-06-09  0:09             ` Samuel Wales
2022-06-09  0:16               ` Samuel Wales
2022-06-09  0:23                 ` Samuel Wales

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).