Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
デフォルトで現在のブランチをオリジンにプッシュするように git を設定する方法はありますか?
例えば、私はやりたい:
git push origin
そして、現在チェックアウトしているブランチを上流のオリジンにプッシュします。
に設定push.defaultしtrackingます。
push.default
tracking
$ git config --global push.default tracking
アップストリーム ブランチが設定されていると仮定して、現在git push使用しているブランチのみをプッシュします (「 」を参照git branch --set-upstream)。
git push
git branch --set-upstream