setting up git

merlin2049er

Well-Known Member
Licensed User
Longtime User
Hi, I'm trying to figure out how to add my basic4android apps on github.

I've seen a few android apps on it, how do I go about setting it up?
 

andymc

Well-Known Member
Licensed User
Longtime User
I'm afraid I can't help you with Github as it seems really complicated.

But have you thought about alternatives?

What the reason for using Github, are you writing team based applications the need to be distributed online, if so, then maybe dropbox would work for you? I use it for my app source code so I can work on my apps on multiple PC's without having to sync anything manually, dropbox does it all for me.

So I can work on something on the train on my laptop, then get home adn the laptop automically uploads the changes to my dropbox so the desktop PC can carry on working on the app without thinking about it. This would also work well for team projects, just share the folder amongst your team and any updates people make will automatically be shared to everyone else. Dropbox also keeps backups of previous versions of files.
 

moster67

Expert
Licensed User
Longtime User
Git works fine and so does Dropbox although Git lets you see code-changes easily (using diff-tools) and revert back to a previous version.

This is my reply to another post:

1) For a long time I kept my project-files in the Dropbox-folder and worked directly in this folder on my computer. Dropbox offers a possibility to grab previous files which indeed has saved me a few times. However, I believe Erel mentioned somewhere that working this way with Dropbox may not be the best solution although I never had problems with Dropbox.

2) Now I am doing everything using GIT. There is a site called Bitbucket which lets you for free keep private project whereas GitHub only allows public projects unless you pay a small monthly fee. Then you can use a free client such as Source Tree or GitHub for Windows to manage and handle your projects. This is great as a backup, to enforce you to write down changes you've made to your apps (how many times haven't your users asked you for the change-log?) but most importantly to revert any commits you may have done. It takes some to set up but once configured properly, it is great. You can use tools such as "diffs" which let you see the changes in your code etc. In addition, it is great when working in a team. It is also great when I work with my private apps during my lunch-break at work. When I get home, I just pull the changes down and my project at home is up-to-date. Of course, this works viceversa as well.

You can then add the following lines to your git-ignore file (I think there is no need for including these folders/files):

B4X:
#B4a
bin/
gen/
src/
*.apk
*.dex

This should be enough for version-handling and as a separate back-up. The only (minor) problem is when you update to (and compile using) a new version of B4A because most b4a-files result altered (because version number of B4A is being changed in B4A-files). In this case, you can commit everything nonetheless and put a note such as version change of B4A.
 
Last edited:
Top