Giter VIP home page Giter VIP logo

Comments (8)

dudebout avatar dudebout commented on May 14, 2024

I just bumped into that problem and will look into your proposed solution.

from magit.

tarsius avatar tarsius commented on May 14, 2024

@dudebout does this issue still exist?

from magit.

tarsius avatar tarsius commented on May 14, 2024

You can stage them (without actually resolving the merge conflicts) and once staged delete them.

Downgrading to feature-request for doing it in one step.

from magit.

mbunkus avatar mbunkus commented on May 14, 2024

Staging & then discarding is certainly possible, but having gone through a lot of such situations recently I can safely say that it is annoying and error-prone. If your merge (or re-base or whatever) involves a lot of files then having to add an unstaged part first means that I also have to search for where the newly added file to be discarded shows up in the list of staged changes. Highly annoying, and like I said, a potential source for quick mistakes (ooops, I've moved one line down too much and discarded the wrong item).

Consider this a +1 to this feature request. I'd even consider this a bug as magit is doing stuff that git fails with 100% of the time.

from magit.

tarsius avatar tarsius commented on May 14, 2024

As noted in #552 we also have to take care of the deleted by us/them states. I consider this a special case of the above (well I hope :-)

from magit.

mar-kolya avatar mar-kolya commented on May 14, 2024

Unfortunately it is impossible to stage a 'deleted by us' file because stage uses '-u' option for git add. This makes 'two step' process of removing unstaged file described above impossible for such files.

from magit.

tarsius avatar tarsius commented on May 14, 2024

I have implemented this on the next branch.

k on an unmerged file now offers to pick either side. The command magit-checkout-stage can also be used directly, e.g. to restore the conflict.

from magit.

ReubenRahul avatar ReubenRahul commented on May 14, 2024

you can reset the file and later on can checkout from the file you want.

git reset builtin/fetch.c

git checkout builtin/fetch.c

I hope these will solve the problem.

from magit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.