git add adding ignored files

You probably have a negative rule (include-again rule, the one that starts with an !) in your .gitignore file somewhere after the node_modules line. git check-ignore has a bug/ambiguity in the docs. You expect that if git check-ignore node_modules/ prints node_modules/, then node_modules/ is ignored. But actually it prints a pathname if that pathname matches …

Read more

git find fat commit

You could do this: git ls-tree -r -t -l –full-name HEAD | sort -n -k 4 This will show the largest files at the bottom (fourth column is the file (blob) size. If you need to look at different branches you’ll want to change HEAD to those branch names. Or, put this in a loop …

Read more

Git merge branch into master

Conflicts are going to happen if both branches have changes to the files. This is a good thing. Keeping your branches up-to-date with each other will prevent some of them . However over all, conflicts are not bad. The rebase option can also prevent many of them from happening. git merge branch_1 If you are …

Read more

Yarn v2 gitignore

See the Questions & Answers section of the documentation. It has changed several times, so for the most up to date answer just click that link! But in the StackOverflow spirit of “no link-only answers” here’s a snapshot: Which files should be gitignored? If you’re using Zero-Installs: .yarn/* !.yarn/cache !.yarn/patches !.yarn/plugins !.yarn/releases !.yarn/sdks !.yarn/versions If …

Read more