How i can use GitHub to control version in my Frappe project?

I’m starting to use Frappe, but for my project I’ll working with my friend to create one app.
I started the project in my local machine, but now we need work using version control (prefer Git).
I created the repository, but I found some troubles to version it, like different folder’s path reference or others .git file internally on App’s bench repository.
Anyone can help me with this? I haven’t found any documentation about this.

I’m a Jr. Dev, if possible, explain step by step please!

I tried push all the folder, I tried push only Apps and Sites folders, I tried some approach, but still haven’t any success or progress

1 Like

Hi @Roque

Firstly, welcome to the community!

To help you further, can you please explain in detail what steps have you taken so far to setup your development environment?

Are you trying to build and manage custom Frappe apps using Git or are you trying to manage environments (dev, staging, UAT, production, etc.) using Git?

2 Likes

You just have to push your app folder, the sites and other apps are automatically built.

1 Like

Hi @shashank_shirke! Thank you!

Well, I had follow this documentation: Frappe Docs 14

I used:

bench init my_frappe
cd my_frappe
bench new-app my_app
bench new-site myapp.site
bench --site myapp.site add-to-hosts
bench set-config -g developer_mode true
bench start

and I started create one DocType…

I tried push all my folder using git init and git add .
I tried use .gitignore ignoring all files except apps and sites
For any case, when my friend take a pull the project, he can’t work on project

Oh, really? This seems good, but how my friend can reproduce this on him pc? all edit’s is reflected on App folder? He can run bench new-site and install my app folder in this to get all modifies?

Hey @rmehta , I used this and worked fine! Thank you!
But I have more one question, for any changes, we are needing to reinstall the site using:
bench --site myapp.site reinstall
have other command to reload apps changes on site?
I tried reload-doctype, clear cache, but worked only with reinstall… but this clears the entire database…