Skip to main content

2 posts tagged with "help"

View All Tags

· One min read
Kumar Nitesh

So, on daily basis after working on a big feature and after creating PR, my PR builds fails(yes we have CI/CD built in). Most of the time the reason for fail is linting issue but sometime it's Merge Conflict. I used to rebase the traget branch and resolve merge conflict, but this used to recreate all the commits that I had done, just creating duplicate commits. Recently I came across a better way of resolving PR merge conflict.

Let's assume we are working on feature/branch-that-needs-to-be-merged and our working branch has created a PR against main-development-branch. The PR autobuild has failed due to merge conflict and you need to resolve this merge conflict. To resolve

checkout main-development-branch get latest checkout feature/branch-that-needs-to-be-merged get latest and then run git pull origin main-development-branch

It will display Merge conflict, resolve your merge conflict, commit and push feature/branch-that-needs-to-be-merged. Now your PR will not show any merge conflict and build will also pass. Given now you have all check pass for a succesfull merge you can go ahead and merge you code.

~ Happy coding

· One min read
Kumar Nitesh

To fix Git password after you have changed it in GitHub.com

on macOS, you can use

git config --global credential.helper osxkeychain

Above command will show no output. But a username and password prompt will appear with your next Git action (pull, clone, push, etc.).

For Windows, it’s the same command with a different argument:

git config --global credential.helper wincred