Files
30-seconds-of-code/snippets/git/s/automatic-push-upstream.md
Angelos Chalaris 4d0316a062 Update covers
2023-05-07 22:25:00 +03:00

24 lines
596 B
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: Automate upstream branch creation
type: snippet
language: git
tags: [configuration,repository]
author: chalarangelo
cover: messy-computer
dateModified: 2022-10-19T05:00:00-04:00
---
Configures the repository to automatically create upstream branches on push.
- Use `git config --add --bool` to enable automatic upstream branch creation on push.
- You can use the `--global` flag to enable this setting globally.
```shell
git config [--global] --add --bool
```
```shell
git config --global --add --bool
# `git push` will automatically create new branches, if they don't exist
```