Skip to content

Add Details on Setting Upstream Branch and Branch Switching Alternatives #1359

Open
@AdityaSrivastava185

Description

@AdityaSrivastava185

Is your feature request related to a problem? Please describe.
The current Git contribution guide is missing details about setting an upstream branch when pushing code, which is essential for simplifying workflows. Additionally, it does not mention the alternative to git checkout for branch creation and switching (git switch), which is more modern and intuitive. This might confuse contributors, especially beginners.

Describe the solution you'd like
Add a short section explaining the purpose of setting an upstream branch (using git push -u) and how it helps streamline future git push and git pull`` commands. Also, include the modern alternative git switchalongsidegit checkout` for creating and switching branches, with examples for clarity.

Describe alternatives you've considered
An alternative is to leave the guide as-is, but that might make it less beginner-friendly. Including these updates will make the guide more complete and accessible to new contributors.

Additional context
Adding these updates aligns with modern Git practices and helps open-source contributors use Git commands more effectively. Screenshots or a step-by-step example can further clarify the concept if needed.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions