# Building "hello world!" with Pycharm and git

**URL:** <https://forums.digi.com/t/building-hello-world-with-pycharm-and-git/21413>\
**Category:** Python\
**Tags:** build, git, pycharm, python, xbee\
**Created:** [May 29, 2020, 12:53pm UTC](https://forums.digi.com/t/building-hello-world-with-pycharm-and-git/21413 "2020-05-29T12:53:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Antoine](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@Antoine](https://forums.digi.com/u/Antoine)\
**Post date:** [May 29, 2020, 12:53pm UTC](https://forums.digi.com/t/building-hello-world-with-pycharm-and-git/21413/1 "2020-05-29T12:53:25Z")

</div>

Hello everyone.

I am currently working with a few XBee3 (XB3-24Z8PT-J) for some UI + remote motor application.

Since I need to share my code with other colleagues we decided to use Github.

I have installed Python 3.8.2, PyCharm community 2020.1.1, git 2.26.2 an github desktop 2.5.0.

I already successfully build upload and test a few simple IO “blink LED” programs made by myself and now I want to make my motor driver control program, and keep it on github to share it with the colleagues.

I now have two basic XBee MicroPython Projects.

its a single line:  
print(“Hello World!”)

The first one works, the second one is in a github repository folder and work in a very awkward way.

The thing is PyCharm is flashing the .gitignore file and the whole .git folder as if it was part of my single line “hello world!” program.

here the output:  
Deploying application in selected XBee device (COM5 - 115200/8/N/1/N)…

Cleaning stored code… [OK]  
Flashing file /build/.git/config (1/27)… [OK]  
Flashing file /build/.git/description (2/27)… [OK]  
Flashing file /build/.git/FETCH\_HEAD (3/27)… [OK]  
Flashing file /build/.git/HEAD (4/27)… [OK]  
Flashing file /build/.git/hooks/applypatch-msg.sample (5/27)… [OK]  
Flashing file /build/.git/hooks/commit-msg.sample (6/27)… [OK]  
Flashing file /build/.git/hooks/fsmonitor-watchman.sample (7/27)… [OK]  
Flashing file /build/.git/hooks/post-update.sample (8/27)… [OK]  
Flashing file /build/.git/hooks/pre-applypatch.sample (9/27)… [OK]  
Flashing file /build/.git/hooks/pre-commit.sample (10/27)… [OK]  
Flashing file /build/.git/hooks/pre-push.sample (11/27)… [OK]  
Flashing file /build/.git/hooks/pre-rebase.sample (12/27)… [OK]  
Flashing file /build/.git/hooks/pre-receive.sample (13/27)… [OK]  
Flashing file /build/.git/hooks/prepare-commit-msg.sample (14/27)… [OK]  
Flashing file /build/.git/hooks/update.sample (15/27)… [OK]  
Flashing file /build/.git/index (16/27)… [OK]  
Flashing file /build/.git/info/exclude (17/27)… [OK]  
Flashing file /build/.git/logs/HEAD (18/27)… [OK]  
Flashing file /build/.git/logs/refs/heads/master (19/27)… [OK]  
Flashing file /build/.git/logs/refs/remotes/origin/HEAD (20/27)… [OK]  
Flashing file /build/.git/objects/pack/pack-1ca67c90bababd28dd80a9fa57e3873aeee26faa.idx (21/27)… [OK]  
Flashing file /build/.git/objects/pack/pack-1ca67c90bababd28dd80a9fa57e3873aeee26faa.pack (22/27)… [OK]  
Flashing file /build/.git/packed-refs (23/27)… [OK]  
Flashing file /build/.git/refs/heads/master (24/27)… [OK]  
Flashing file /build/.git/refs/remotes/origin/HEAD (25/27)… [OK]  
Flashing file /build/.gitignore (26/27)… [OK]  
Flashing file /build/main.mpy (27/27)… [OK]  
Running application… [OK]

DEPLOY SUCCESSFUL

It takes forever and I dont want to fill the XBee’s memory with all that git stuff.

Any idea how I tell pycharm not to flash all these files into the XBee??

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![mvut](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/mvut/32/31_2.png) [@mvut](https://forums.digi.com/u/mvut)\
**Post date:** [June 1, 2020, 9:09am UTC](https://forums.digi.com/t/building-hello-world-with-pycharm-and-git/21413/2 "2020-06-01T09:09:24Z")

</div>

All of these files are telling the XBee to reach out and try to download the files from GetHub. Not what you want to do. I believe what you want is found in the Help files of PyCharm at [https://www.jetbrains.com/help/pycharm/2020.1/github.html?utm\_campaign=PC&amp;utm\_content=2020.1&amp;utm\_medium=link&amp;utm\_source=product](https://www.jetbrains.com/help/pycharm/2020.1/github.html?utm_campaign=PC&amp;utm_content=2020.1&amp;utm_medium=link&amp;utm_source=product)

---

<div class="post-metadata">

**Author:** ![Antoine](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@Antoine](https://forums.digi.com/u/Antoine)\
**Post date:** [June 2, 2020, 8:47am UTC](https://forums.digi.com/t/building-hello-world-with-pycharm-and-git/21413/3 "2020-06-02T08:47:49Z")

</div>

thank you kind sir let me take a look at your link

---

<div class="post-metadata">

**Author:** ![Antoine](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@Antoine](https://forums.digi.com/u/Antoine)\
**Post date:** [June 2, 2020, 8:48am UTC](https://forums.digi.com/t/building-hello-world-with-pycharm-and-git/21413/4 "2020-06-02T08:48:04Z")

</div>

So I made a token for my github account but nothing has changed.

Whenever I “run” the project it makes a copy of my “.gitignore” file and “.git” folder inside the “\build” folder, and flash all of the files on the XBee.

How can I customize the build rules, there must be something no?

---

<div class="post-metadata">

**Author:** ![Antoine](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@Antoine](https://forums.digi.com/u/Antoine)\
**Post date:** [June 2, 2020, 8:47am UTC](https://forums.digi.com/t/building-hello-world-with-pycharm-and-git/21413/5 "2020-06-02T08:47:34Z")

</div>

This was quite complex for me to figure out:

File \> Settings \> Editor \> File Types  
In the bottom “Ignore files and folders” delete the “.git;” part of the string  
press ok

File \> Settings \> Project: \> Project Structure  
click on the now visible .git folder and select “Excluded”  
in the bottom “Ignore files and folders” add “.gitignore”

it now builds nicely and flash only the main.py file.
