git add . vs git add -A , didnt do the same thing

Started by
1 comment, last by Wyrframe 7 years, 1 month ago

Im readin arround the internet they do the same thing...It didnt

I just moved lots of folders out of a folder. Than I did [git add .], it didnt detected renamed or modifyed, it gave me a zillion added and deleted...Than I simply runned [git add -A] and ta dah, a zillion renamed...wtf is wrong with the internet

Advertisement

The default behavior for 'git add .' changed with Git 2.0. It's now the equivalent of 'git add .; git add -u'.

Here's the release notes: https://github.com/git/git/blob/f99a38c0121456822f8a9dfb7928eefceaa98201/Documentation/RelNotes/2.0.0.txt#L32-L36

Also, Git cannot reliably autodetect renames or moves of files or folders. If you want to record the move of something from one name and/or location to another, use `git mv (src) (dst)` to tell Git explicitly what you're doing. This also helps `blame`-like tools follow histories backwards past rename events.

RIP GameDev.net: launched 2 unusably-broken forum engines in as many years, and now has ceased operating as a forum at all, happy to remain naught but an advertising platform with an attached social media presense, headed by a staff who by their own admission have no idea what their userbase wants or expects.Here's to the good times; shame they exist in the past.

This topic is closed to new replies.

Advertisement