Example for git reset HEAD -- filename.type please
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 408
- Avg merge
- 2d 57m
- Merged PRs (30d)
- 7
Description
I am coming at GIT with an external view of how it works. Internals I have very little idea about.
I have figured out that I need to call repo.reset() to do the same as git reset HEAD -- filename.type.
But I have no idea how to find the OID that I need to use.
Looking at git-reset code I seem to need a treeish. How do I get a treeish that corresponds to HEAD?
I guess I walk that tree looking for the filename and get a OID from the tree.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the mentioned repo.reset() API and the git-reset code, focusing on how a treeish corresponding to HEAD and the filename OID are obtained. Done means adding an example that explains the equivalent of git reset HEAD -- filename.type for pygit2.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100