Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Merges a pull request or topic branch via rebasing to avoid a merge commit.
This is a git extension that merges a pull request or topic branch via rebasing so as to avoid a merge commit. To merge a PR or branch, the script does the following:
target
from the remote
repository and reset your local
target
to match it.target
.[close #<PR number>]
to the last commit message so
that Github will close the pull request when the merged commits are pushed.target
.target
to the remote
repository.Note:
remote
defaults to "origin"
(configurable; see below)target
defaults to "master"
git land [options] [<remote>] <pull request number>[:<target>]
git land [options] [<remote>] <branch>[:<target>]
git land 123
git land my-topic-branch
git land origin 42:target-branch
git land origin feature-branch:target-branch
-f, --force-push-topic
: force push rebased topic branchIf this option is specified, git-land
will force push the rebased topic branch
request to the remote
repository. Pull request branches are
read-only, so git-land exits with an error if invoked with a
pull request number and this option specified.
-F, --no-force-push-topic
: do not force push rebased topic branchIf this option is specified, git-land
will not force push the rebased topic
branch request to the remote
repository, even if configured to do so by
default.
You can install git-land using npm install.
npm install --global git-land
Put the bash script in a folder that is in your PATH
and make it executable.
For example, to install it to ~/bin/
, do the following:
curl -o ~/bin/git-land https://raw.githubusercontent.com/git-land/git-land/master/git-land
chmod +x ~/bin/git-land
Before pull requests for a remote repository can be landed by number, the git
remote for that repository must be configured to fetch pull requests as branches
in your local fork. To do so, run the following command, replacing both
occurences of origin
with the name of the git remote if necessary.
git config --add remote.origin.fetch '+refs/pull/*/head:refs/remotes/origin/pr/*'
By default, git-land
assumes the remote repository is pointed to by the git
remote origin
. To use a different default git remote, set the git-land.remote
option. For example, to use a remote named upstream
:
git config git-land.remote upstream
By default, git-land
merges the branch or pull request into master
if no
target branch is specified. To use a different default target branch, set the
git-land.target
option. For example, to use a default target branch named
dev
:
git config git-land.target dev
By default, git-land
does nothing with the topic branch after rebasing it
locally. Specifying the --force-push-topic
option overrides this behavior,
force pushing the rebased topic branch to the target remote. To make this
behavior the default, set the git-land.force-push-topic
option to true
:
git config git-land.force-push-topic true
Thanks to @paulirish for git-open, from which I cribbed the format and some content for this README.
Copyright 2015 Bazaarvoice, Inc., RetailMeNot, Inc., and git-land contributors Licensed under Apache 2.0
FAQs
Merges a pull request or topic branch via rebasing to avoid a merge commit.
The npm package git-land receives a total of 1 weekly downloads. As such, git-land popularity was classified as not popular.
We found that git-land demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.