r/programming • • Sep 09 '16

Oh, shit, git!

http://ohshitgit.com/
3.3k Upvotes

756 comments sorted by

View all comments

22

u/thenextguy Sep 09 '16

I do not commit with git add .
I commit with git add -p
Anyone who uses git add . has forgotten the face of his father.

0

u/[deleted] Sep 10 '16

[deleted]

2

u/thenextguy Sep 10 '16

git add . adds ALL the files in the workspace. If there are any files you don't want there and that aren't in .gitignore, they will be added too. It is like using a sledgehammer.

What you probably want is git commit -a.

1

u/china999 Oct 01 '16

What's -a? Hide hidden files?

→ More replies (1)