Back to writing

gicoto - git commit tool with interactive staging and custom date

A simple streamline Git commits with interactive file selection and commit dates.

5 min read · Aug 28, 2025
Photo by Praveen Thirumurugan

Description

gicoto is a Bash script that streamlines Git commits by allowing you to

It uses fzf for interactive file selection and provides a clean workflow for crafting precise commits.

Key features

Requirements

Installation

  1. Save the script as gicoto.
  2. Make it executable:
    chmod +x gicoto
  3. (Optional) Move it to a folder in your $PATH:
    sudo mv gicoto /usr/local/bin/

Usage

Basic usage

Run the script in your Git repository: gicoto

Step-by-step workflow

  1. The script lists unstaged files using git status --short.
  2. You select files to stage interactively via fzf (press Space/Tab to mark, Enter to confirm).
  3. Enter a custom commit date or press Enter to use today.
  4. Enter a commit message.
  5. The script commits with --date and pushes automatically.

Example

  1. Run gicoto.
  2. Select files:
    M script.sh
    ?? new_file.txt

    (Space/Tab to mark, Enter to confirm.)
  3. Enter commit date:
    Enter commit date (default: today): 2025-08-27
  4. Enter commit message:
    Enter commit message: Fix script and add new file
  5. The script will execute:
    git add script.sh new_file.txt
    git commit --date="2025-08-27" -m "Fix script and add new file"
    git push

How it works

  1. Lists modified/unstaged files using git status --short.
  2. Uses fzf --multi to let you pick files interactively.
  3. Uses awk to extract only the file names from Git's output.
  4. Stages the selected files with git add.
  5. Prompts for a commit date and message.
  6. Creates a commit with git commit --date to preserve custom timestamps.
  7. Pushes changes automatically with git push.

Input validation

License

Free to use, modify, and share.