I often encounter the following scenario:
modified: assembly/main.debug.s
modified: ../src/cd/Config.java
modified: ../src/cd/memoization/cfg/SubgraphFinder.java
modified: ../src/cd/memoization/cfg/SubgraphMap.java
modified: ../src/cd/profiler/Profile.java
modified: ../test/cd/test/TestSamplePrograms.java
modified: ../../notes/20150521.txt
Here I have a bunch of files and I want to include them in different commits. What I do so far is to do a bunch of git add <pathspec>
followed by a respective git commit
. The <pathspec>
is what annoys me. Is there something like the following?
1 modified: assembly/main.debug.s
2 modified: ../src/cd/Config.java
3 modified: ../src/cd/memoization/cfg/SubgraphFinder.java
4 modified: ../src/cd/memoization/cfg/SubgraphMap.java
5 modified: ../src/cd/profiler/Profile.java
6 modified: ../test/cd/test/TestSamplePrograms.java
7 modified: ../../notes/20150521.txt
git magic 2,3,5 -m "My super simple commit"