On Wednesday, December 18, 2013 11:18:10 AM UTC+1, THUFIR HAWAT wrote:
> It seems potentially problematic to commit a single source code file, and 
> not all source code.  Potentially, for example in Java, the project might 
> not even compile.  
> What circumstance(s) would a single necessitate a single file commit?

Some times you just want to change one file. Then you just commit a single 
file. Probably you do this by first staging/indexing the file in question 
with git add [filename].

If you want to test whether your Java project compiles with the 
staged/indexed changes alone, disregarding other changes in the working 
directory, it's wise to first do a git stash save --keep-index and run 

If all looks good, you commit, and afterwards run git stash pop to get the 
other changes back to the working directory.

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to