libgit2 / libgit2/libgit2

Is there a way to `push --force-with-lease`?

Open
#3,947 4 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
C
Stars
10.6k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

This type of force is extremely useful because it prevents pushing over changes that have been pushed by others since one's branch was last pulled. (relevant git docs page)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked git-push documentation to understand the force-with-lease behavior, then locate libgit2's push handling and public API. Define the expected lease-checking behavior and add coverage showing that pushes are rejected when the remote changed; the issue does not name specific files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, git
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.