Skip to content

knhcr/git-pullff-main

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

概要

  • Powershell スクリプト

  • main ブランチをチェックアウトせずに main ブランチをリモートから pull --ff-only する

    • git fetch origin main:main だと fast forward 不可能な場合も上書き更新されてしまうため
  • カレントブランチが main ブランチの場合は何もせず終了

    • 作業ツリーが detached HEAD を避けるため

設定

$localMain  # ff で進める対象のローカルブランチ名
$remote     # fetch 対象のリモートリポジトリ名
$remoteMain # fetch 対象のリモートブランチ名

使用方法

.\git-pullff-main.ps1

About

Pull the main branch from the remote WITH --ff-only, WITHOUT checking out the main branch.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published