How to use Pycharm to push your code to GitLab

by Daniel Pham
Published: Updated:

You can successfully install Pycharm in Linux Mint. Now we will learn how to use Pycharm to push your code to GitLab.

I assume that you can check out and clone the GitLab repository to your computer.

Write code and Add version

For example, I will create a file called demo-gitlab.py. When creating a new file, a message board will appear as image below.

add version git to new file
Add version git to new file.

It notifies you whether you want to Add version for this file. If yes, click Add right on this window.

If this message does not appear, and your file is red as shown in this picture.

new file created has not been added version and has red color
New file created has not been added version and has red color. 

Right click to the file, select Git -> + Add or you press Ctrl + Alt + A. Your file has now turned green.

Recommended Reading: How to install Pycharm community in Linux Mint

Push and Commit code

Here, you will learn how to push your code on GItLab.

In the image below, you will see 2 icons in blue and green colors.

click on the green icon to push code to gitlab
Click on the green icon to push code to GitLab.

To push your code to GitLab, click on the green icon (or press Ctrl + K).

A Commit window will appear, where you will write your commit message.

write a commit message and push code to GitLab
Write a commit message and push code to GitLab.

Recommended Reading: How to install Gitlab plugin in Pycharm

After you have finished writing the commit message. Click the Commit and Push... button as shown in the image above. And done.

Conclusion

Using Pycharm and GitLab may not be difficult, but for new people it may be a problem.

I myself too, at first I didn’t know how to make it work. I don’t know how to put my code on GitLab with Pycharm.

Now you can do it easily.

(This is an article from my old blog that has been inactive for a long time, I don’t want to throw it away so I will keep it and hope it helps someone).

0 0 votes
Article Rating

You may also like

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

DevOps Lite is a personal blog specializing in technology with main topics about DevOps, DevSecOps, SRE and System Administrator. Articles are shared for free and contributed to the community.

SUPPORT US

FOLLOW US

Subscribe my Newsletter for new blog posts. Stay updated from your inbox!

© 2021-2024 DevOpsLite.com – All rights reserved.

Please write sources “DevOpsLite.com” when using articles from this website.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

0
Would love your thoughts, please comment.x
()
x

Adblock Detected

Please support us by disabling your AdBlocker extension from your browsers for our website.