Skip to content

Instantly share code, notes, and snippets.

@cz
Last active December 22, 2015 08:18
Show Gist options
  • Save cz/6443618 to your computer and use it in GitHub Desktop.
Save cz/6443618 to your computer and use it in GitHub Desktop.
How I wish I could selectively stage files with git...
↪ git status
# On branch sample
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# [1] modified: this/or/that/file.css
# [2] modified: this/or/that/file.py
# [3] modified: some/unrelated/thing.js
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# [4] another/new/file.py
no changes added to commit (use "git add" and/or "git commit -a")
↪ git add -s 1,2,4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment