B4J Tutorial PushPull - simple app to sync B4X code with GitHub

TLDR; A simple Windows desktop app for syncing a local folder with a GitHub repository, without needing Git installed.


Clarification: I developed this (.Net), Im not promoting some random app :D

How does this apply to B4X?

The app supports the command-line so you can push via Macros or ide links.

The UI is inspired by WinSCP so you can set up "Projects" (ie repos). The project can be referenced in the command-line interaction.

B4X:
#Macro: Title, Push to GitHub, ide://run?File=C:\Apps\PushPull\PushPull.exe&Args=MyProject&Args=push

' Open the UI (open with "MyProject" loaded)
'ide://run?File=C:\Apps\PushPull\PushPull.exe&Args=MyProject

' Perform a push (using MyProject config)
'ide://run?File=C:\Apps\PushPull\PushPull.exe&Args=MyProject&Args=push

PushPull for GitHub​

A simple Windows desktop app for syncing a local folder with a GitHub repository, without needing Git installed.

Aimed at solo developers and non-technical users who want to use GitHub for file backup and sharing but find Git, SSH keys, and the command line intimidating. If you just want to keep a folder in sync with a repo and don't need branching, merging, or a full Git workflow, PushPull gets out of the way and lets you do that with a few clicks.

Good for: scripts and config files you want backed up offsite, sharing assets between machines, lightweight version history without learning Git, or anywhere a full Git client feels like overkill.

screenshot.png

Features​

  • Connect to GitHub using a personal access token (no Git required)
  • Register multiple projects, each linking a local folder to a GitHub repo
  • Side-by-side file browser showing local and remote files (inspired by WinSCP)
  • Files grouped by folder, with full relative paths shown for easy navigation
  • Color-coded status: see at a glance which files are newer locally, newer on GitHub, or only exist on one side
  • Push or pull individual files, all changed files, or all files in a folder (right-click)
  • Delete selected or all remote files via the Remote menu
  • Click column headers to sort by name or date
  • Flexible ignore patterns: wildcards, file extensions, and folder names
  • Restores your last project, window position, and size on startup
  • Single instance: launching a second copy raises the existing window
  • Command line support for opening a specific project or pushing without a UI
 
Last edited:

aeric

Expert
Licensed User
Longtime User
' Open the UI (open with "MyProject" loaded)
'ide://run?File=C:\Apps\PushPull\PushPull.exe&Args=MyProject
' Perform a push (using MyProject config)
'ide://run?File=C:\Apps\PushPull\PushPull.exe&Args=MyProject&Args=push
Q1. What is "MyProject" config? Is it a .INI file?

Q2. How do you specify the comment/description for the push?
 

tchart

Well-Known Member
Licensed User
Longtime User
Q1. What is "MyProject" config? Is it a .INI file?

Q2. How do you specify the comment/description for the push?
Aeric have a look at the GitHub - code is there too.

PushPull has a json config file. This contains the GitHub token and then config for your projects.

You create a project per repo - it’s just a mapping between the local folder, the repo, branch and what files/folders to ignore. So you would have multiple “projects” available in the app that you can switch between. I modelled the UI after WinSCP so think of each project as a connection to a repo.

At this stage you can’t add comments. It just pushes the changes. Even though it’s called “push all” it only pushes changes as it determines what has changed.

I wanted to keep it as simple as possible.
 

tchart

Well-Known Member
Licensed User
Longtime User
Aeric just to add my dev workflows heavily use my b4x custom build actions (b4x_cba) which includes a GitHub push. I was a bit unhappy with that given the need for ini files etc.

In b4x_cba i recently added methods to call WinSCP to push files up to a VPS using a b4j macro. This is done by referencing the WinSCP connection name.

That kind of influenced the direction of this app but I decided to build a UI as well as CLI support.
 
Top