[Feature request] Commit flag to "ignore" conflicting/unmerged changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, the scenario is as follows: I'm working on a repo where only
"rebase" is used and never "merge" (which can arguably be a bad
thing). Anyway, I worked on a separate branch for some time and now I
need to integrate all the changes introduces by "master" (and prepare
some "fixup" commits that will be used when the branch will be finally
rebased).

So I call `git merge --squash --no-commit master` and some conflicts
come out. Suppose that I now have 100 files automatically merged and
staged by git, and 10 files which are conflicting ("both modified")
and I'll need to fix by hand.

The point is: I would like to commit *all* the changes that git
successfully merged (*including* partial changes inside conflicting
files). After that, I will start to work on the conflicts (which will
be resolved with several "fixup" commits).

For the moment, the only (quite tedious) way I've found to do it is this:
1. `git reset HEAD` for each of the 10 conflicting files
2. `git add -p` and select only the non-conflicted hunks
3. `git commit` let's call this commit "temp"

Then, I can finally work with *just* the conflicts. When I will rebase
on master, I will simply discard the "temp" commit and I will apply
every fixup that piled up.

The feature I'm requesting is something like a flag that allows `git
commit` to work anyway by "ignoring" unmerged hunks (which can then be
downgraded to unstaged changes).

What do you think?

Regards,
William
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]