Photo by Mohammad Rahmani on Unsplash
If you happened to miss the master
branch and your organization uses the more populistic main
naming convention as the default branch, don't worry!
You can easily switch back to the previous environment without causing any issues using a simple Git alias command.:
$ git symbolic-ref refs/heads/master refs/heads/main
This tool won't replace everything, but it can help you use old commands like:
$ git checkout master
$ git rebase -i master
$ git diff master
Top comments (2)
I would also add
It has to be adapted to your
git remote
of courseIt's important to document how to remove the link if you dislike it
You can use
git symbolic-ref -d