Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid git commit -am #70

Merged
merged 1 commit into from Dec 11, 2018
Merged

Avoid git commit -am #70

merged 1 commit into from Dec 11, 2018

Conversation

pllim
Copy link
Contributor

@pllim pllim commented Dec 10, 2018

I have seen many people bitten by the -am option. I am suggesting something easier to undo.

p.s. Not sure why my Emacs generated diff in L3. Maybe it is fixing some pesky endline character added by Mac.

@arfon arfon merged commit 1ee8f3a into spacetelescope:master Dec 11, 2018
@arfon
Copy link
Contributor

arfon commented Dec 11, 2018

👍

@pllim pllim deleted the readme-no-am branch December 11, 2018 18:43
@jamienoss
Copy link

-a only auto stages already tracked files. If tracked files are changed, why do said changes not want to be committed?

git docs

"Tell the command to automatically stage files that have been modified and deleted, but new files you have not told Git about are not affected."

Using git add <file>, in this context, passes repsonsibility to the user rather than letting git manage this for you, e.g. what happens when you forget to explcitly add a file to stagging?

@jamienoss
Copy link

jamienoss commented Dec 11, 2018

FYI - I use git commit -a all of the time, as my default workflow. The only time I use git add is to:

  1. track new files
  2. stage changes that I do not want to be explcitly responsible for commiting, e.g. resolving merge/rebase conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants