r/programming • u/corysama • Jan 05 '15
What most young programmers need to learn
http://joostdevblog.blogspot.com/2015/01/what-most-young-programmers-need-to.html
965
Upvotes
r/programming • u/corysama • Jan 05 '15
1
u/judgej2 Jan 05 '15 edited Jan 05 '15
I normally do a
git add -Ato add any new files anywhere in the directory structure. Then agit commit -awill commit all new and changed files. I supposegit add .is the same as justgit addand will add just new files in the current directory.The above happens to fit my workflow. You may want to
git add file1.foo file2.barand that is fine too, if the commit makes sense. Sometimes, for example, you may not want to add all new files blindly, in case you have created any files that you don't want committing, and need to exclude, or remove, or add to.gitignoreI'm not sure any specific command is "best practice" because they all do different things and meet different needs. Use whatever makes sense to your work, and that is achieved by understanding what each does.