Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit files #15

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Edit all files of given type(s)
Edit all files of type(s): deleted, modified, etc. git edit-files
accepts many types types at once: git edit-files --modified --others.
  • Loading branch information
phdru committed Jul 18, 2016
commit 8b725508c6da1c42f900b8f8be9fca93026a6cfb
9 changes: 9 additions & 0 deletions gitalias.txt
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,15 @@
unadd = reset HEAD
unstage = reset HEAD

# Edit all files of given type(s)
edit-files = !"f() { git ls-files \"$@\" | sort -u ; }; \"${VISUAL:-${EDITOR:-vi}}\" `f \"$@\"`"
edit-cached = !"f() { git edit-files --cached; }; f"
edit-deleted = !"f() { git edit-files --deleted; }; f"
edit-others = !"f() { git edit-files --others; }; f"
edit-ignored = !"f() { git edit-files --ignored; }; f"
edit-killed = !"f() { git edit-files --killed; }; f"
edit-modified = !"f() { git edit-files --modified; }; f"

# Editing and adding conflicted files: when we get many merge conflicts
# and want to quickly solve them using an editor, then add the files.
edit-unmerged = !"f() { git ls-files --unmerged | cut -f2 | sort -u ; }; "${VISUAL:-${EDITOR:-vi}}" `f`"
Expand Down