venta: (Default)
[personal profile] venta
In a radical departure from asking people what they're wearing, I would now like to ask for help with git. If you don't understand the question, just be very grateful and move on ;-)

When an incoming git pull suffers a merge failure[*], why, why, does git decide to compound the problem by staging every modified file it can lay its grubby little paws on?

I assumed that if I started typing "why does git stage..." into Google it would auto-complete with all the various phrases distressed people all over the internet have typed in. It does not, and I can't find anyone writing about it. For bonus points, tell me how to stop it doing this - but I'll settle for understanding the rationale behind it!

[*] Which, if the two versions have changed lines anywhere near each other, it will

Date: 2015-11-13 07:21 am (UTC)
From: [identity profile] venta.livejournal.com
don't be afraid of squashing commits

I am mostly afraid of everything with git. A typo or a not-very-well-understood command line can have such... surprising and far-reaching consequences :)

Date: 2015-11-13 08:11 am (UTC)
From: [identity profile] qatsi.livejournal.com
Yes, Git can be unforgiving ... I had to make the jump straight from CVS to Git about 18 months ago and some aspects were quite disorienting. But I'm more comfortable now and it usually does what I expect it to.

Date: 2015-11-14 11:40 am (UTC)
From: [identity profile] octalbunny.livejournal.com
The command-line git tools recognise "branchname@{ten.minutes.ago}" for where your branch was before, and you can create new a new branch from that so that it appears in the GUI tool. I normally create a local temporary branch before doing a history rewrite that I'm not certain about.

The help pages for this syntax are git-reflog and git-rev-parse.

Profile

venta: (Default)
venta

December 2024

S M T W T F S
1234567
891011121314
15161718192021
2223 2425262728
293031    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 27th, 2025 06:44 pm
Powered by Dreamwidth Studios