Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Self-built git server connection Pycharm series 4: pycharm project

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

In pycharm, code typing has already started, which is an existing project that is not connected to the git server.

Now it's time to implement how to synchronize this project to the server.

Premise:

The git service has been set up on the Linux server. The git service has been installed in the local development environment (your own Windows computer). Body 1. Create a main warehouse in the git server [root@dscrapy01 ~] # mkdir / home/gitrepository/ and create another, dedicated to store the specified project warehouse [root@dscrapy01 gitrepository] # mkdir test initialization warehouse [root@dscrapy01 gitrepository] # cd test [root@dscrapy01 test] # git-- bare init initializes the empty Git warehouse in / home/gitrepository/test/ [root@dscrapy01 test] # lsbranches config description HEAD hooks info objects refs2, configure the local git environment of pycharm

Open pycharm,File-- > Settings-- > Version Control-- > Git

3. The project connects to the git server 3.1 the project is set to the git project

Open a project that exists

Click VCS-- > import into version control-- > create git repository

Select your own project and click OK

Then, under the interface of pycharm, there will be an additional console option for version control.

Such as:

By this time, the project has set up a version cache locally. You can use log to find differences between different versions.

However, what you want to achieve is not local version control, so you need to continue.

3.2 Connect to the git server

After selecting version control, click the commit icon on the left (the icon on the left looks like the shared icon), and then the figure is as follows:

After submission, normally there should be no commit and push, only commit patch, so first commit patch execute it, and then from the previous step, execute commit and push.

After submission: fill in two parts:

Name: project name URL:root user is the user used to submit code on the git server, IP is the IP of the server, followed by / home/gitrepository/test, (not shown in the picture), is the code repository of the project project created in the first step.

Click OK

Hint, let you enter the password of the root user: check remember, and then use this user to submit it later, you don't need to enter the password.

When you are finished, you will display the contents of the push you want. Just select all of them.

4, the completion of the lower right corner of pycharm will prompt a Push successful prompt, that is, successful. At this point, the construction and use of private warehouses are realized.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report