Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replicate `git commit --only` #985

Closed
chrisjsewell opened this issue Feb 20, 2020 · 2 comments
Closed

Replicate `git commit --only` #985

chrisjsewell opened this issue Feb 20, 2020 · 2 comments
Labels
Q&A

Comments

@chrisjsewell
Copy link

@chrisjsewell chrisjsewell commented Feb 20, 2020

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?

@Imipenem
Copy link

@Imipenem Imipenem commented Aug 6, 2020

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

@Byron Byron added the Q&A label Aug 12, 2020
@Byron
Copy link
Member

@Byron Byron commented Aug 12, 2020

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.

@Byron Byron closed this Aug 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.