From: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
To: Atharva Raykar <raykar.ath@gmail.com>
Cc: git <git@vger.kernel.org>
Subject: Re: [GSoC] My Git Dev Blog - Week 3
Date: Tue, 8 Jun 2021 00:25:46 +0530 [thread overview]
Message-ID: <4a4a3d6f-7d06-ccdb-7d5a-4057c7549927@gmail.com> (raw)
In-Reply-To: <FC56DF49-CEC5-4C9F-BDE4-B0119558E4B2@gmail.com>
Hi Atharva,
On 06/06/21 5:56 pm, Atharva Raykar wrote:
> Hi,
>
> Here is my latest instalment in my weekly Git blog:
> http://atharvaraykar.me/gitnotes/week3
>
Nice post!
> My not-so-well-read guess: Some users want certain submodules
> active in one worktree, but not the other. For that, there
> presumably exists a per-worktree configuration, and the current
> implementation just assumes a configuration that applies to the
> full repo. Changing this is definitely a patch for some other time.
I get to the same presumption. You could try exploring worktrees more to
confirm as you point out. You could also try Cc-ing people who you think
would have an idea of this. 'git blame' could you here.
> A painful merge
You don't mention which branches you were trying to merge but
from the context I sort of figured out it was the
'submodule-add-in-c-add-config-v2' and
'submodule-add-in-c-add-clone-v3' branches in your repository:
https://github.com/tfidfwastaken/git/
You mention trying 'recursive' strategy. Given this isn't a
fast-forward merge, I would've expected it to be one that would've
been triggered by default. Was that not the case for you?
Also, which version of Git did you use to do the merge ?
I tried reproducing the merge and it's indeed interesting that
even '-Xpatience' didn't do the trick.
> I still wonder how non-Emacs users deal with situations like these.
Git lets you invoke external merge tools which could help you resolve
merge conflicts in a easy way. See mergetool doc [1] to get an idea
about it. `git mergetool --tool-help` would give you a list of supported
tools. In your case, I happened to notice that P4Merge[2] does a good
job of properly resolving the conflict by itself.
[1]: https://www.git-scm.com/docs/git-mergetool
[2]:
https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge
Speaking of resolving conflicts, there's also rerere [3] which should
save you from having to resolve the same conflict again and again.
[3]: https://www.git-scm.com/book/en/v2/Git-Tools-Rerere
> So I’m glad there’s the reflog.
Now that you've learned about and used reflog, I thought I'll let you
know about `git fsck --lost-found` [4] in case it might come in handy
someday ;-)
[4]:
https://git-scm.com/docs/git-fsck#Documentation/git-fsck.txt---lost-found
>
> Have a great weekend, and stay safe!
>
Thanks. Hope you stay safe too!
--
Sivaraam
next prev parent reply other threads:[~2021-06-07 18:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-06 12:26 [GSoC] My Git Dev Blog - Week 3 Atharva Raykar
2021-06-07 8:19 ` Christian Couder
2021-06-07 8:57 ` Bagas Sanjaya
2021-06-07 12:52 ` Atharva Raykar
2021-06-07 18:55 ` Kaartic Sivaraam [this message]
2021-06-08 7:13 ` Atharva Raykar
2021-06-08 17:55 ` Kaartic Sivaraam
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=4a4a3d6f-7d06-ccdb-7d5a-4057c7549927@gmail.com \
--to=kaartic.sivaraam@gmail.com \
--cc=git@vger.kernel.org \
--cc=raykar.ath@gmail.com \
/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).