When should I close (i.e. delete) the branch after a successful pull request? Rule of thumb: always. (There are exceptions of course.) What if I need to recover the deleted work? You'll just git checkout -b <branch> <sha>
Tag Archives: git
Conflicting package-lock.json in Git?
30-Oct-18Include package-lock.json in your git repository, but try to commit it alone (to avoid noise in diffs). When encountering conflicts during merge: npm install --package-lock-only As running that command then suggests, you might also want to consider automating the process by installing npm-merge-driver (npx npm-merge-driver install -g).
Cancel Conflicting Git Merge (--ABORT)
30-Oct-18Your keyword here isĀ abort. git merge --abort
git branch -a | tr -d \* | sed '/->/d' | xargs git grep [string or regex] This can be slow, though, and git log may be more effective. git log -p --all -S 'search string' git log -p --all -G 'match regular expression' This produces list of commits, so we need to find branches […]