3 ms·
git init . git add file git commit -am "my message" Pretty simple really. You don't need to think about staging if you don't want to.
by osigurdson 4y ago
git init .
git add file
git commit -am "my message"
Pretty simple really. You don't need to think about staging if you don't want to.
- dataflow 4y agoIs that a typo or intentional? If you did git add, you don't want commit -a, right?
- seba_dos1 4y agoI believe these were supposed to map to what its parent comment has listed.
- osigurdson 4y ago"git add" is used in this context to add an untracked file (like the fossil example). git init . vi file (initial content) git add file git commit -am "first commit" vi file (make changes) git commit -am "second commit" Basically if you use commit -am, you never have to worry about staging - which is most of the time imo. In the rare case where you want to avoid committing something that has changed use git add to stage individual files.