Operation using PyCharm Github (II): new branches, switching, merging, deleting

In the article the use of PyCharm operation Github: New warehouse, update, roll back the code, we have learned how to use PyCharm to operate Github, which includes some common operations Github: New warehouse, updates, and roll back the code. In this article, we will introduce another part of the common operations Git: the new branches, switching, merge, delete, these operations we will be implemented by PyCharm, use Github as a demonstration of Git.
We assume that the reader already set up Git and Github account in PyCharm while some basic understanding of the Git branch operation. We have a test project Github_From_PyCharm on the author's Github, for example, visit the project's web site is: https: //github.com/percent4/Github_From_PyCharm, the project is now only a default master branch.
We clone the project locally.

New branch

Novel network https://www.guxs.net/

PyCharm clone to open with local Github_From_PyCharm items, click on the lower of the following Event log Git: master branch information can be found to the project, as shown below:

can be found, the item on the local, remote Github only one default master branch. Click "+ New Branch" to create a new branch, we named "test" branch, create good will find the bottom right after "Git: master" is displayed as "Git: test", explained the project in the local branch has switching to test branch, we create a test.txt, the content of which is "This is a test branch in 2019-12-21."
article according to the item using the operation PyCharm Github: warehouse create, update, step rollback submitted to the code on Github, the interface successfully submitted after Github follows:
Github
to view the test branch, we can see a new a test.txt file, which reads as follows:

test test.txt
This shows that we have successfully created a new branch: test, and submitted successfully.

Switch

Branch switch PyCharm in very simple, we click again on the bottom right corner Event Log under "Git test", shown below:


can be seen, now renamed item has two branches on the local, Github: master and test, while now the test branch. If we want to switch to the master branch, you need to click on the right side of the text master branch "origin / master", and then select the "Checkout" can, at this time the lower right should be displayed as "Git: master", explained the project has switched to the master branch a.

Branches merge

If we need to test the combined branch to master branch is merged into the master branch test modify the contents of the branch. The first item is switched to the master branch, right -> Git -> Repository -> Merge Changes, as shown below:

In the dialog box shells, branches merged to select local branch test, and write Commit Message, as shown below:

Click "Merge" button, the project has been successful merger. If we want to master branch after the merger be submitted to the Github, this time we need to pay attention, right click the selection Git, select "Add" and then push to Github, note, choose "Add", rather than "Commmit Directory" otherwise PyCharm will prompt "no changes detected". This time we'll see what the master branch on Github, shots are as follows:


you can see, remote branches have been merged successfully, we successfully modify the content test branches merged into the master branch.

Deleted branches

Branch delete operation is very simple, and very similar to the switching operation of the branch, we click on the bottom right corner of "Git master", click on the test local branch to be deleted, then select "Delete" can be.

The share is over, thank you for reading ~

note: I now opened micro-channel public number: Python crawlers and algorithms (Micro Signal as: easy_web_scrape), welcome attention Oh ~ ~

Intelligent Recommendation

IDEA+Git, detailed graphic operations such as creating branch branches, checkout switching branches, and merging branches

1) Preliminary preparations first step: On Github, create onehello_branch The remote warehouse of the name is an empty warehouse.   Second step: Add one to the remote warehouseREADME-TEST.md File...

Detailed explanation of the method of git creating branches, switching branches and merging branches in idea

Detailed explanation of the method of git creating branches, switching branches and merging branches in idea (The study notes are for reference only) 1: Create a branch Click git in the lower right co...

Using git in pycharm, merge conflicts between local branches of all github processes

Initially, we only have one master branch, and the test1 and test2 codes have only two lines of repeated code. Start experiment Based on the master branch, we create two branches in a row, branch1, br...

Android Studio to use git to create, switching, merging branches branch

Use git version androidstudio management more and more widely used up; first of all we need to install git.ext. 1. Download git: Open Addresshttps://git-scm.com/download/git download the corresponding...

[github] Cloning, deleting branches, overwriting local warehouses, etc.

Article Directory Preface 1 Clone the project from github 2 Fork the project from github 3 Clone the project branch from github 4 Synchronize the project you fork with the original Github project (upd...

More Recommendation

Using GitHub in Pycharm

Pycharm is currently the best IDE for Python development, especially Django. GitHub is a sacred place for programmers. Almost everyone uses it. This article assumes that you have some knowledge of Pyc...

pycharm step using github

Pycharm GitHub first want to link to download the installation package git, installation   Install Git 1, openhttps://git-scm.com/downloadsURL, click the Windows download       &nb...

Interactive operation of Pycharm and Github

Interactive operation of Pycharm and Github precondition 1. Git has been installed 2. Pycharm has been installed 3. Have registered a Github account: http://www.github.com 4. Git and Github accounts h...

GIT detection, viewing branches, switching branches, new branches and other simple commands

GIT detection, viewing branches, switching branches, new branches and other simple commands First of all, you need to install git and configure the git environment variable Right -click the directory ...

git branch creation, branch merging, branch deletion (deleting local branches and deleting remote branches) branch management, bug branches, version branches, test branches, etc.---super detailed graphic tutorials (you can see it at a glance, don’t be afraid)

Prior statement: I use the command line in webstorm. The execution effect is the same as in the git command window, no difference. Anything will do. Can ignore this problem 1. Create a git branch ①Bef...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top