LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

git-touch

Create files and stage them for commit

TLDR

Touch and stage file
$ git touch [file.txt]
copy
Create multiple files
$ git touch [file1.txt] [file2.txt]
copy

SYNOPSIS

git touch files

DESCRIPTION

git touch creates files and stages them for commit. It combines the Unix `touch` command with `git add`, creating empty files that are immediately tracked.The command is useful for creating placeholder files that will be committed. It saves the separate steps of creating files then adding them.

PARAMETERS

FILES

Files to create and stage.
--help
Display help information.

INSTALL

sudo apt install git
copy
sudo dnf install git
copy
sudo pacman -S git
copy
sudo apk add git
copy
sudo zypper install git
copy
brew install git
copy
nix profile install nixpkgs#git
copy

CAVEATS

Part of git-extras package. Creates empty files. Files still need to be committed.

HISTORY

git touch is part of git-extras, combining file creation with staging for convenience.

SEE ALSO

touch(1), git-add(1), git-extras(1)

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid