Skip to content

Replicate git commit --only #985

Description

@chrisjsewell

Apologies if this is a 'newbie' question, but is there a way to commit only certain paths from the index tree, akin to git commit --only file.txt?

Activity

  1. Imipenem commented on Aug 6, 2020

    @Imipenem

    This would be very interesting to know, since I can not find anything like this in the docs or somewhere

  2. Byron commented on Aug 12, 2020

    @Byron
    Member

    I think if in doubt, and for these one-off commands, one can start off using git directly. That way you can basically write simple scripts closely resembling git invocations in python.

    Otherwise one would have to implement this functionality using the plumbing (low-level functionality) provided by GitPython, which isn't what anyone should start out with.

    Even though I close this issue, please feel free posting follow-up questions here for eventual response.

  3. reopened this on Feb 26, 2021
  4. locked and limited conversation to collaborators on Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions