4DPop Git
Description
4DPop Git makes it simple to manage your project as a Git repository.
README
4DPop Git
4DPop Git brings a friendly, developer-oriented Git interface right inside the 4D IDE.
No need to read the git command-line documentation or to be a Terminal expert: everyday operations — stage, commit, branch, fetch, pull, push, stash, diff — are handled for you, so you can stay focused on your work.
It also exposes a scriptable API (the Git and gh classes) so you can automate Git and GitHub tasks from your own code.
Highlights
- Visual overview of your working copy: pending changes, staged files and history.
- Everyday Git actions in a couple of clicks:
- Stage / unstage / untrack files
- Commit (with amend)
- Fetch, pull and push (with force-with-lease)
- Branch: create, switch, merge, rename, delete
- Stash: save, snapshot, pop
- Diff files with your external diff tool
- Commit history with author avatars (Gravatar) and asynchronous, non-blocking loading.
- Per-method history from the code editor: while editing a method or class, open the full Git history of that file — every commit that touched it (subject, author, date, short hash, ± line counts and rename tracking), the diff against the previous commit, plus a top entry for uncommitted changes (or a brand-new, not-yet-committed file).
- Blame a selection: select one or more lines of a method in the code editor and instantly see the last commit that modified them.
- Fork-style commit graph: colour-coded lanes for branches and merges, with reference labels — local branches, remotes (with their GitHub icon), tags and stashes — tinted to match their lane, in both light and dark mode.
- Publish to GitHub in one step, using the GitHub CLI (
gh) with device-flow authentication — no manual token handling. - Git LFS support.
- A scriptable API available to host projects through the
gitnamespace.
Prerequisites: Git must be installed
macOS
Git ships with Xcode, so nothing more is needed if it is installed. Otherwise, install the latest version of Git from this page.
Windows
If you have not already done so, install Git from this page.
Optional: GitHub CLI (for the Publish to GitHub feature)
The one-step Publish to GitHub flow relies on the GitHub CLI. The component embeds a fallback binary, but installing gh on your machine is recommended.
Installation
Recommended (4D v21+): Project dependencies
Use the 4D Dependencies Manager UI to install the component:
- Open your project in 4D (v21+).
- Open the Dependencies Manager.
- Add a GitHub dependency.
- Enter the GitHub repository address:
vdelachaux/4DPop-Git. - Choose the version you want (for example
latest). - Apply changes and let 4D update project dependencies.
No manual JSON editing is required.
Fallback for binary databases or legacy setups
If you are not using project dependencies (for example in older or binary database workflows):
- Copy
4DPop Git.4dbase(or create an alias) into theComponentsfolder next to your structure. - Restart the database.
Usage
Open the 4DPop Git entry to display the main window for the current project's working copy. From there you can review your changes, stage and commit them, and synchronize with your remotes.
Main window
Commit history
Commit graph
A full branch graph is drawn next to the history, in the style of dedicated Git clients such as Fork: each branch and merge gets its own colour-coded lane, and reference labels (branches, remotes with their GitHub icon, tags and stashes) are tinted to match the lane they belong to.
File menu
Open menu
Method history (from the code editor)
A Git history… entry is added to the 4D method editor's macro menu. While editing a method or class, it opens a dedicated window showing the Git history of that file:
- on the left, every commit that modified the file — commit subject, author, date, short hash, ± line counts, and rename tracking (
--follow); - on the right, the diff of the selected commit against its parent;
- a top entry for the file's uncommitted changes, or, for a brand-new file, its not-yet-committed content.
The window opens a single instance per file (re-invoking brings it to front) and closes automatically when you close the corresponding method editor.
Last commit for a selection
Select one or more lines of a method or class in the code editor and run the Last commit for selection… macro: 4DPop Git reports the most recent commit that modified those lines — short hash, author, date and subject — using git blame behind the scenes.
Scripting API
The component exposes two classes to host projects through the git class store namespace:
| Class | Access | Purpose |
|---|---|---|
Git |
cs.git.Git.me |
Wrapper around the local git command line |
gh |
cs.git.gh.me |
Wrapper around the GitHub CLI (auth, create/delete repositories) |
var $git : cs.git.Git:=cs.git.Git.me
$git.add("all")
$git.commit("My commit message")
$git.push()See the class documentation for the full API.
Source code
The component is distributed in compiled form, with source code available in the Sources folder inside the component.





