Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the commands related to branch operation in idea environment

Shulou Source: shulou.com Published: 2022-06-02 05:57:47 10月03日 Update

What are the commands related to branch operation in idea environment? in view of this question, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.

Today we analyze the commands related to branch operations and branch creation and merging under idea.

1. Commands related to branch operation under idea

Git checkout-b new_branch creates a new branch

Git checkout new_branch switches to another branch

Git branch to view branch list information (* Mark the current branch)

Git branch-d new_branch Delete Branch-D (force deletion)

Git merge branch_name merges the specified branch to the current branch

1.1 list shows a list of all branches

1.2 create a branch (the default git will switch to the new branch after the branch is created)

1.3 switch back to the trunk to delete branches and view the current branch list information

2. Branch creation and merging 2.1 Branch creation and file addition

2.2 backbone merge branch

2.3 View the list of files after a successful merger

2.4 basic operation of pushing local branch files to remote related commands

Git branch View Local Branch

Git branch-a view local and remote branches

Git branch-d local_branch delete local branch

Git push origin: remote_branch deletes the remote branch (the local branch is still reserved)

Git branch-m |-M oldbranch newbranch rename the branch. If the newbranch name branch already exists, you need to use-M to force renaming, otherwise, use-m to rename.

Git push origin branch_name pushes the local branch to the remote

Delete successfully remotely keep only the backbone content:

This is the answer to the question about what are the commands related to the branch operation in the idea environment. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.

Tags: Branches commands success backbone files questions environment information content more analyze switch help force push answer easy easy name basic operation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Xiaomi Linux Apple Shulou Technology