From: "David Tweed" <david.tweed@gmail.com>
To: git@vger.kernel.org
Subject: Advice on strategy for "temporary" commits
Date: Sun, 11 Mar 2007 05:22:48 +0000 [thread overview]
Message-ID: <e1dab3980703102122i398d1fa5ib4e629d32134f4e4@mail.gmail.com> (raw)
In-Reply-To: <e1dab3980703102101s21401403ja28c6273ecaa7b83@mail.gmail.com>
> Try if "git checkout -m" does what you wanted. Or simply
> do a merge of "more often" branch into "less often" branch,
> perhaps simply not recording it as a merge with
> "git merge --squash" followed by "git commit".
>
> By the way, you know that you can --amend a commit?
Jakub suggested primarily being on the temporary branch,
when updating the archival branch is desired to first commit
to the temporary branch, then switch to the archival branch
and do a "git merge --squash temp-branch-name" and commit.
This seems to half-work, in that when it doesn't flag a merge
conflict it does what I want. Unfortunately it often seems to detect
"conflicts" that aren't conflicts for my usage and which make
automatic cron usage impossible, eg,
-------------------------------- 8< -------------------------------
$ git merge --squash temp
100% (4/4) done
Auto-merged s
CONFLICT (content): Merge conflict in s
Squash commit -- not updating HEAD
Automatic merge failed; fix conflicts and then commit the result.
$ more s
H1
t1
t2
<<<<<<< HEAD:s
=======
t4
t5
>>>>>>> temp:s
--------------------------------- 8< ----------------------------
I _think_ if I could specify an opposite of the "ours" merge
strategy that always takes file contents from the other branches
head commit. An alternative might be to see if I can figure out directly
commiting the relevant file tree to both branches using low-level
git commands avoiding the higher level git processing (since
this isn't really a merge of different development but recording
the same "content state" on two different branches maybe
trying to make a "merge" work is the wrong idea.)
[In case anyone thinks I'm wrong to want to work primarily from cron
jobs, my rationale is that this stuff is personal to me -- ie,
won't be independently changed by anyone else -- and isn't
a focussed product. Years ago I tried using RCS on my home
directory and found I spent lots of time writing contentless
commit messages like "save
at 11.15 on 05/06/02" and that during crunch periods I'd
avoid making check-ins because it was too much extraneous
work; but these were _precisely_ the times I'd be most likely
to rush and do some stupid changes I'd want to back out, so it
didn't really work and so I stopped using RCS. With my "safety net
and historical archive" usage pattern -- which is different from
productised development -- I really want something safe to
run from cron.]
Anyway, thanks for all the help.
--
cheers, dave tweed__________________________
david.tweed@gmail.com
Rm 124, School of Systems Engineering, University of Reading.
Details are all that matters; God dwells there, and you never get to
see Him if you don't struggle to get them right. -- Stephen Jay Gould
prev parent reply other threads:[~2007-03-11 5:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-08 14:39 Advice on strategy for "temporary" commits David Tweed
2007-03-08 16:11 ` Alex Riesen
2007-03-08 16:32 ` J. Bruce Fields
2007-03-08 17:07 ` David Tweed
2007-03-08 18:02 ` Mark Wooding
2007-03-09 10:15 ` Jakub Narebski
[not found] ` <e1dab3980703102101s21401403ja28c6273ecaa7b83@mail.gmail.com>
2007-03-11 5:22 ` David Tweed [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e1dab3980703102122i398d1fa5ib4e629d32134f4e4@mail.gmail.com \
--to=david.tweed@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).