Git
Distributed version control for every change to your files
About
Git records snapshots of your project. Review history, branch off experiments, collaborate with others. It powers nearly every code host, and is the first thing to set up in a working directory.
Install it
pkg install git
Run this inside Termux. If the package is already present, pkg will say so and
do nothing.
Commands worth knowing
6 of the invocations you will actually reach for. Tap the copy button to put one on your clipboard.
git init Start tracking the current folder as a new repository. git clone https://example.com/project Copy a remote repository and its full history onto your device. git status Show which files changed since the last snapshot, and which are staged. git add . Stage every change in the current folder. The next snapshot will include it. git commit -m fix-typo Save a labelled snapshot of everything you have staged. git log --oneline Print a compact list of past snapshots, one line each. Worked example
Run git status and this is what you should see.
$ git status
On branch main
Your branch is up to date with 'origin/main'.
Changes not staged for commit:
modified: README.md
no changes added to commit Staged changes appear in a separate section above.
Developed by
The Git project · released under GPL-2.0.